10% tinyratings

Code Review | tinyRatings

WordPress plugin tinyRatings scored10%from 54 tests.

About plugin

  • Plugin page: tinyratings
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Apr 16, 2017
  • Latest release: Jun 13, 2018
  • Number of updates: 14
  • Update frequency: every 30.6 days
  • Top authors: deployer (78.57%)ideag (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,130 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/tinyratings/class-tinyratings.php+505
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▼1.74MB] [CPU: ▼57.50ms] Passed 4 tests

Server-side resources used by tinyRatings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.214.88 ▼36.49
Dashboard /wp-admin2.28 ▼1.066.21 ▼58.76
Posts /wp-admin/edit.php2.28 ▼1.077.39 ▼40.77
Add New Post /wp-admin/post-new.php2.28 ▼3.605.96 ▼93.96
Media Library /wp-admin/upload.php2.28 ▼0.956.78 ▼27.08
tinyRatings /wp-admin/options-general.php?page=tinyratings-settings2.286.16

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: 1 new table, 7 new options
New tables
wp_tinyratings
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_tinyratings-top-widget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for tinyRatings
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,113 ▲1,35220.34 ▲5.9862.07 ▲60.3141.02 ▼0.68
Dashboard /wp-admin2,812 ▲6388.45 ▲2.88164.50 ▲62.6364.99 ▲23.26
Posts /wp-admin/edit.php2,723 ▲6264.16 ▲2.20135.26 ▲99.4369.17 ▲36.73
Add New Post /wp-admin/post-new.php1,538 ▲1223.55 ▲0.54712.94 ▲60.9087.44 ▲38.01
Media Library /wp-admin/upload.php2,011 ▲6145.94 ▲1.74161.72 ▲67.0165.12 ▲21.36
tinyRatings /wp-admin/options-general.php?page=tinyratings-settings1,9393.10144.5063.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/tinyratings/class-tinyratings.php+505
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • Zombie tables were found after uninstall: 1 table
    • wp_tinyratings
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_tinyratings-top-widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tinyratings-settings
    • > Warning in wp-content/plugins/tinyratings/class-tinyratings.php+505
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/tinyratings/class-tinyratings.php on line 505
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tinyratings/class-tinyratings-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: 5 stars, ratings, like, dislike, stars...

tinyratings/tinyratings.php Passed 13 tests

The main PHP file in "tinyRatings" ver. 0.2.2 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Plain and simple ratings plugin. Rate anything.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .as - Adobe Flash ActionScript File in Adobe Flash
      • wp-content/plugins/tinyratings/js/fingerprintjs2/flash/FontList.as
8,270 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121,1833886,294
PHP9544821,414
Markdown4780194
CSS2103128
HTML2192121
JSON20058
Bourne Shell16529
ActionScript15026
make1205
YAML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity18.75
▷ Minimum class complexity3.00
▷ Maximum class complexity50.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods75
▷ Static methods5066.67%
▷ Public methods7194.67%
▷ Protected methods00.00%
▷ Private methods45.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.58MB with 0.24MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png81.26KB33.19KB▼ 59.16%
js/fingerprintjs2/specs/lib/jasmine-2.3.4/jasmine_favicon.png1.45KB1.48KB0.00%
screenshot-2.png231.17KB107.00KB▼ 53.71%
screenshot-1.png275.74KB122.38KB▼ 55.62%