10% rating-writing

Code Review | Rating-Writing

WordPress plugin Rating-Writing scored10%from 54 tests.

About plugin

  • Plugin page: rating-writing
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 6.3.1
  • First release: Dec 30, 2015
  • Latest release: Jun 18, 2016
  • Number of updates: 43
  • Update frequency: every 4.0 days
  • Top authors: grace-create (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,047 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/rating-writing/classes/meta-boxes.class.php+82
    Methods with the same name as their class will not be constructors in a future version of PHP; MceButton has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼49.23ms] Passed 4 tests

An overview of server-side resources used by Rating-Writing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.10 ▼33.19
Dashboard /wp-admin2.11 ▼1.195.50 ▼42.61
Posts /wp-admin/edit.php2.11 ▼1.256.24 ▼38.60
Add New Post /wp-admin/post-new.php2.11 ▼3.787.04 ▼82.50
Media Library /wp-admin/upload.php2.11 ▼1.125.36 ▼31.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Rating-Writing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.47 ▲0.101.96 ▲0.3144.26 ▲4.43
Dashboard /wp-admin2,218 ▲275.85 ▼0.05102.92 ▲3.4341.63 ▼3.22
Posts /wp-admin/edit.php2,098 ▲62.04 ▲0.0435.29 ▼1.4032.12 ▼1.09
Add New Post /wp-admin/post-new.php6,541 ▲5,00719.06 ▼4.06917.44 ▲237.0574.15 ▲19.35
Media Library /wp-admin/upload.php1,394 ▲64.09 ▼0.10100.21 ▲1.1942.23 ▼2.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/rating-writing/classes/meta-boxes.class.php+82
    Methods with the same name as their class will not be constructors in a future version of PHP; MceButton has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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

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
Please fix the following items
  • 4× 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/rating-writing/includes/controller.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rating-writing/includes/tag.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rating-writing/includes/meta-boxes.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/rating-writing/rating-writing.php:41

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin-1), #2 (Admin-2), #3 (Admin-3), #4 (Browser)
The official readme.txt might help

rating-writing/rating-writing.php 92% from 13 tests

The entry point to "Rating-Writing" version 1.2.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected518 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP64465306
CSS2230151
JavaScript10035
PO File14426

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
5 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/images/rw_btn.png0.30KB0.23KB▼ 25.48%
screenshot-4.png18.94KB18.80KB▼ 0.74%
screenshot-3.png9.24KB9.35KB0.00%
screenshot-1.png19.84KB19.51KB▼ 1.70%
screenshot-2.png7.47KB7.35KB▼ 1.63%