84% simple-photo-sphere

Code Review | Simple Photo Sphere

WordPress plugin Simple Photo Sphere scored84%from 54 tests.

About plugin

  • Plugin page: simple-photo-sphere
  • Plugin version: 0.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Mar 23, 2019
  • Latest release: Jun 14, 2020
  • Number of updates: 20
  • Update frequency: every 22.5 days
  • Top authors: snagysandor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,169 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.65ms] Passed 4 tests

A check of server-side resources used by Simple Photo Sphere
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.36 ▼1.28
Dashboard /wp-admin3.39 ▲0.0846.77 ▼2.68
Posts /wp-admin/edit.php3.50 ▲0.1451.44 ▼0.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.48 ▼18.50
Media Library /wp-admin/upload.php3.31 ▲0.0835.55 ▲2.85
Simple Photo Sphere /wp-admin/options-general.php?page=simple_photo_sphere3.2730.89

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
simple_photo_sphere_settings
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple Photo Sphere
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8115.09 ▲0.8613.61 ▲12.0338.65 ▼2.57
Dashboard /wp-admin2,210 ▲224.86 ▼1.04107.53 ▲6.1437.83 ▼1.51
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0540.79 ▼1.0334.89 ▲0.03
Add New Post /wp-admin/post-new.php1,545 ▲1218.20 ▼4.82605.96 ▼29.5556.26 ▲3.14
Media Library /wp-admin/upload.php1,392 ▲104.22 ▼0.0299.37 ▲1.8542.65 ▼1.13
Simple Photo Sphere /wp-admin/options-general.php?page=simple_photo_sphere1,0512.0623.9832.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • simple_photo_sphere_settings
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-photo-sphere/admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-photo-sphere/sps-img.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-photo-sphere/simple-photo-sphere.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Contributors: No tags were detected
Please take inspiration from this readme.txt

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

This is the main PHP file of "Simple Photo Sphere" version 0.0.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Insert your post or page a photo sphere image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,267 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript506958
PHP31321307
CSS1062

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
sample.png1.70KB0.99KB▼ 42.02%