68% wp-photo-sphere

Code Review | WP Photo Sphere

WordPress plugin WP Photo Sphere scored 68% from 54 tests.

About plugin

  • Plugin page: wp-photo-sphere
  • Plugin version: 3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2013
  • Latest release: Sep 17, 2017
  • Number of updates: 39
  • Update frequency: every 43.6 days
  • Top authors: Jeremy Heleine (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

2,000+ active / 33,377 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.74MB] [CPU: ▼50.90ms] Passed 4 tests

A check of server-side resources used by WP Photo Sphere
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.214.82 ▼36.11
Dashboard /wp-admin2.26 ▼1.046.53 ▼41.50
Posts /wp-admin/edit.php2.27 ▼1.096.36 ▼37.36
Add New Post /wp-admin/post-new.php2.26 ▼3.626.29 ▼88.62
Media Library /wp-admin/upload.php2.26 ▼0.966.75 ▼27.55
WP Photo Sphere /wp-admin/options-general.php?page=wp-photo-sphere/wp-photo-sphere.php2.276.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
wpps_version
wpps_settings
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Photo Sphere
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.64 ▼0.651.57 ▼0.6552.56 ▲0.34
Dashboard /wp-admin2,210 ▲254.85 ▼0.01104.97 ▲3.2842.07 ▼0.08
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0639.69 ▼3.4334.33 ▼0.51
Add New Post /wp-admin/post-new.php1,533 ▼123.16 ▲0.03673.09 ▲16.6061.59 ▼6.99
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0298.02 ▼1.5240.61 ▼2.80
WP Photo Sphere /wp-admin/options-general.php?page=wp-photo-sphere/wp-photo-sphere.php1,3372.0724.5228.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > 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 wpps-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
    • can_compress_scripts
    • widget_recent-posts
    • wpps_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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=wp-photo-sphere/wp-photo-sphere.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 wpps-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=wp-photo-sphere/wp-photo-sphere.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 wpps-psv 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=wp-photo-sphere/wp-photo-sphere.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 wp-photo-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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-photo-sphere/wp-photo-sphere.php:89

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: android, photo sphere, equirectangular, photos, 360-degree...

wp-photo-sphere/wp-photo-sphere.php Passed 13 tests

The main PHP file in "WP Photo Sphere" ver. 3.8 adds more information about the plugin and also serves as the entry point for this plugin
95 characters long description:
A filter that displays 360×180 degree panoramas. Please read the readme file for instructions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,087 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP18753477
PO File5180207458
JavaScript43988152

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
wpps-button.png3.35KB1.79KB▼ 46.59%