10% sp-reviews

Code Review | SP Reviews

WordPress plugin SP Reviews scored 10% from 54 tests.

About plugin

  • Plugin page: sp-reviews
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-3.8
  • WordPress version: 5.8.1
  • First release: Aug 20, 2013
  • Latest release: Dec 16, 2013
  • Number of updates: 7
  • Update frequency: every 16.9 days
  • Top authors: dexmedia (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,311 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/sp-reviews/superpages-reviews.php+225
    Function create_function() is deprecated

Server metrics [RAM: ▼1.57MB] [CPU: ▼187.72ms] Passed 4 tests

An overview of server-side resources used by SP Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼0.665.78 ▼23.34
Dashboard /wp-admin2.07 ▼0.986.75 ▼33.81
Posts /wp-admin/edit.php2.08 ▼1.035.73 ▼42.67
Add New Post /wp-admin/post-new.php2.07 ▼3.366.04 ▼651.05
Media Library /wp-admin/upload.php2.08 ▼0.9310.92 ▼18.62

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 1 new option
New WordPress options
widget_spr_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for SP Reviews
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲15015.92 ▲0.127.51 ▼2.8951.96 ▼9.61
Dashboard /wp-admin2,979 ▲485.91 ▼0.02133.40 ▼14.77147.71 ▲26.62
Posts /wp-admin/edit.php2,759 ▲202.57 ▼0.1266.24 ▼4.6691.38 ▼5.58
Add New Post /wp-admin/post-new.php1,696 ▲9018.53 ▼0.30424.56 ▲50.65132.41 ▲20.68
Media Library /wp-admin/upload.php1,841 ▲315.01 ▼0.04162.39 ▲10.49158.13 ▲37.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/sp-reviews/superpages-reviews.php+225
    Function create_function() is deprecated

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === sp-reviews === )
  • Screenshots: Please add images for these screenshots: #1 (Overall rating widget.), #2 (Customer reviews from Superpages.com.)
Please take inspiration from this readme.txt

sp-reviews/superpages-reviews.php 85% from 13 tests

This is the main PHP file of "SP Reviews" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("sp-reviews.php" instead of "superpages-reviews.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)

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
No dangerous file extensions were detected1,012 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP613466724
PO File1114118284
CSS2002
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity28.50
▷ Minimum class complexity22.00
▷ Maximum class complexity35.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
18 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/0_star.png1.21KB0.40KB▼ 66.85%
images/tab_icons2.png3.34KB1.93KB▼ 42.18%
images/1_star.png1.22KB0.67KB▼ 45.15%
images/1.5_star.png1.34KB0.70KB▼ 47.71%
images/superpages-color.png1.92KB0.74KB▼ 61.23%