68% bt2image-sphere

Code Review | bt2.Image Sphere

WordPress plugin bt2.Image Sphere scored 68% from 54 tests.

About plugin

  • Plugin page: bt2image-sphere
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 8, 2017
  • Latest release: Feb 8, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: mhocodus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 592 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.85MB] [CPU: ▼49.14ms] Passed 4 tests

An overview of server-side resources used by bt2.Image Sphere
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.44 ▼34.69
Dashboard /wp-admin2.16 ▼1.1410.34 ▼37.06
Posts /wp-admin/edit.php2.17 ▼1.199.67 ▼38.60
Add New Post /wp-admin/post-new.php2.16 ▼3.728.72 ▼86.22
Media Library /wp-admin/upload.php2.17 ▼1.069.53 ▼25.69
Image Sphere /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php2.179.30

Server storage [IO: ▲1.53MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
bt2is_settings
bt2is_version
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for bt2.Image Sphere
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.27 ▼1.291.82 ▲0.1339.60 ▼5.19
Dashboard /wp-admin2,209 ▲215.84 ▲0.9596.91 ▼11.1037.73 ▼4.62
Posts /wp-admin/edit.php2,095 ▲62.03 ▼0.1139.91 ▲2.3634.70 ▲2.28
Add New Post /wp-admin/post-new.php1,542 ▲2323.21 ▼0.02621.71 ▼55.9051.58 ▼10.65
Media Library /wp-admin/upload.php1,399 ▲144.30 ▲0.0696.81 ▼14.7043.70 ▼5.39
Image Sphere /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php8132.0326.8124.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bt2is-three handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • bt2is_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bt2is-three handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bt2is-canvasrenderer handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bt2is-projector handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bt2is-sphere handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=bt2image-sphere/bt2-imagesphere.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bt2is-image-sphere handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bt2image-sphere/bt2-imagesphere.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === bt2image-sphere === )
You can take inspiration from this readme.txt

bt2image-sphere/bt2-imagesphere.php 85% from 13 tests

The primary PHP file in "bt2.Image Sphere" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bt2image-sphere.php" instead of "bt2-imagesphere.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin25,582 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript818,0873,05525,446
PHP12113113
PO File13323

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin