90% thumbs-rating

Code Review | Thumbs Rating

WordPress plugin Thumbs Rating scored90%from 54 tests.

About plugin

  • Plugin page: thumbs-rating
  • Plugin version: 5.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.4
  • WordPress version: 6.3.1
  • First release: Aug 8, 2013
  • Latest release: Nov 8, 2023
  • Number of updates: 141
  • Update frequency: every 26.6 days
  • Top authors: quicoto (100%)

Code review

54 tests

User reviews

52 reviews

Install metrics

2,000+ active /42,947 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.04MB] [CPU: ▼5.59ms] Passed 4 tests

A check of server-side resources used by Thumbs Rating
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.33 ▼5.11
Dashboard /wp-admin3.36 ▲0.0148.95 ▼12.70
Posts /wp-admin/edit.php3.42 ▲0.0646.72 ▼1.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.03 ▼3.51
Media Library /wp-admin/upload.php3.28 ▲0.0538.70 ▲2.29

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Thumbs Rating
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8614.24 ▼0.102.07 ▼0.1843.28 ▼8.93
Dashboard /wp-admin2,189 ▲155.56 ▼0.0887.05 ▼10.9538.28 ▼5.42
Posts /wp-admin/edit.php2,160 ▲631.98 ▲0.0332.75 ▼5.1934.14 ▼0.69
Add New Post /wp-admin/post-new.php1,526 ▼022.78 ▼0.85683.02 ▼30.4857.49 ▲0.49
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.0394.36 ▼3.7442.83 ▲1.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Basic output with the default CSS with the TwentyThirteen theme.), #2 (This text is shown if you try to vote again.)
The official readme.txt might help

thumbs-rating/thumbs-rating.php Passed 13 tests

The entry point to "Thumbs Rating" version 5.0.0 is a PHP file that has certain tags in its header comment area
42 characters long description:
Add thumbs up/down rating to your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected726 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PO File189036418
PHP115265232
JavaScript171047
CSS18329

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.41
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png40.34KB11.33KB▼ 71.92%
screenshot-1.png26.49KB8.29KB▼ 68.69%