83% addstars

Code Review | AddStars

WordPress plugin AddStars scored83%from 54 tests.

About plugin

  • Plugin page: addstars
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Aug 8, 2022
  • Latest release: Aug 8, 2022
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: addstars (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.05ms] Passed 4 tests

An overview of server-side resources used by AddStars
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.84 ▼4.88
Dashboard /wp-admin3.35 ▲0.0446.24 ▼4.76
Posts /wp-admin/edit.php3.40 ▲0.0444.51 ▼6.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.34 ▼7.84
Media Library /wp-admin/upload.php3.27 ▲0.0435.22 ▼3.87
AddStars /wp-admin/options-general.php?page=addstars3.2430.87

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for AddStars
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.42 ▼1.316.75 ▲4.8349.63 ▲6.52
Dashboard /wp-admin2,227 ▲395.81 ▼0.0794.96 ▼17.7734.88 ▼9.84
Posts /wp-admin/edit.php2,113 ▲242.03 ▲0.0340.21 ▲7.1435.02 ▼1.68
Add New Post /wp-admin/post-new.php1,537 ▲2323.12 ▼0.52648.15 ▼23.0552.67 ▼13.76
Media Library /wp-admin/upload.php1,412 ▲304.36 ▲0.1498.44 ▼7.8141.37 ▼6.16
AddStars /wp-admin/options-general.php?page=addstars8102.0626.6927.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/addstars/views/dashboard-notices.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/addstars/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/addstars/addstars.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (An example of results in Google Search.) image missing
  • Donate link: Invalid url: "#"
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === addstars === )
Please take inspiration from this readme.txt

addstars/addstars.php 85% from 13 tests

The primary PHP file in "AddStars" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "5.2")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "4.6")

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
Everything looks great! No dangerous files found in this plugin191 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32885153
JavaScript2153838

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png18.72KB6.74KB▼ 63.97%