10% rate-this-site

Code Review | Rate This Site

WordPress plugin Rate This Site scored10%from 54 tests.

About plugin

  • Plugin page: rate-this-site
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.3
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: May 9, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: ifourkuldeep1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /585 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method RateThisSite::my_plugin_create_db() should not be called statically

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.51ms] Passed 4 tests

This is a short check of server-side resources used by Rate This Site
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.53 ▲1.07
Dashboard /wp-admin3.32 ▲0.0252.21 ▲0.12
Posts /wp-admin/edit.php3.37 ▲0.0146.30 ▼2.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.43 ▼0.65
Media Library /wp-admin/upload.php3.24 ▲0.0139.47 ▲6.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_ratethissite
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Rate This Site: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲10413.57 ▼0.788.02 ▲5.9642.15 ▼3.01
Dashboard /wp-admin2,216 ▲395.64 ▼0.0285.80 ▼3.3546.17 ▲6.71
Posts /wp-admin/edit.php2,118 ▲152.02 ▲0.0336.69 ▲1.8333.96 ▼2.18
Add New Post /wp-admin/post-new.php1,541 ▲1522.91 ▼0.12651.77 ▼73.4852.28 ▼4.07
Media Library /wp-admin/upload.php1,421 ▲184.23 ▲0.08109.02 ▲5.3051.12 ▲7.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method RateThisSite::rts_deactivation_hook() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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: You can look at the official readme.txt

rate-this-site/rate-this-site.php Passed 13 tests

The main PHP script in "Rate This Site" version 1.0 is automatically included on every request by WordPress
45 characters long description:
Rate this site create exit rate in your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected592 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP111579372
CSS1214190
JavaScript16230

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin