84% shping-reviews-widget

Code Review | Shping Reviews

WordPress plugin Shping Reviews scored84%from 54 tests.

About plugin

  • Plugin page: shping-reviews-wi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2021
  • Latest release: May 15, 2023
  • Number of updates: 4
  • Update frequency: every 164.0 days
  • Top authors: authenticateitpty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.17ms] Passed 4 tests

An overview of server-side resources used by Shping Reviews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.30 ▼5.27
Dashboard /wp-admin3.34 ▲0.0349.55 ▼6.85
Posts /wp-admin/edit.php3.39 ▲0.0349.72 ▲0.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.95 ▼0.85
Media Library /wp-admin/upload.php3.26 ▲0.0337.44 ▲3.03

Server storage [IO: ▲0.05MB] [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: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_shping_reviews_widget
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Shping Reviews: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.27 ▼0.091.99 ▼0.5337.13 ▼8.41
Dashboard /wp-admin2,195 ▲185.63 ▲0.0690.51 ▼11.1140.94 ▼4.73
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0236.52 ▼1.4733.65 ▼1.99
Add New Post /wp-admin/post-new.php1,526 ▼023.50 ▲0.06691.79 ▲48.7151.77 ▼5.94
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0698.28 ▼4.8841.43 ▼3.77

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_shping_reviews_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shping-reviews-widget/Reviews-Widget.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: shping, reviews

shping-reviews-widget/Reviews-Widget.php 92% from 13 tests

The principal PHP file in "Shping Reviews" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shping-reviews-widget.php" instead of "Reviews-Widget.php")

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
Success! There were no dangerous files found in this plugin99 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141180
Markdown19019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png10.99KB4.94KB▼ 55.06%