84% rate-own-post

Code Review | Rate Own Post

WordPress plugin Rate Own Post scored 84% from 54 tests.

About plugin

  • Plugin page: rate-own-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.4
  • WordPress version: 6.3.1
  • First release: Jun 26, 2013
  • Latest release: Jul 2, 2014
  • Number of updates: 19
  • Update frequency: every 19.5 days
  • Top authors: nyasro (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.96ms] Passed 4 tests

This is a short check of server-side resources used by Rate Own Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.98 ▼9.61
Dashboard /wp-admin3.32 ▲0.0246.49 ▼7.72
Posts /wp-admin/edit.php3.38 ▲0.0248.51 ▲1.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.69 ▼0.11
Media Library /wp-admin/upload.php3.24 ▲0.0235.98 ▲3.36

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Rate Own Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.63 ▼0.0737.64 ▼1.02
Dashboard /wp-admin2,209 ▲244.83 ▼0.08111.55 ▼4.1142.91 ▲1.41
Posts /wp-admin/edit.php2,158 ▲692.04 ▲0.0139.37 ▲3.7437.07 ▲2.75
Add New Post /wp-admin/post-new.php1,514 ▼517.63 ▼5.39680.55 ▲71.8456.21 ▲4.02
Media Library /wp-admin/upload.php1,385 ▼04.16 ▼0.0499.51 ▼9.1141.85 ▼3.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rate-own-post/rate-own-post.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === rate-own-post === )
  • Screenshots: Please add images for these screenshots: #1 (Rating column in post edit page.), #2 (Star-Rating box in your post.)
The official readme.txt might help

rate-own-post/rate-own-post.php Passed 13 tests

Analyzing the main PHP file in "Rate Own Post" version 1.0
27 characters long description:
Rate your own post yourself

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1249122

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions6
▷ Named functions6100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
rate.png2.16KB1.15KB▼ 46.83%
icon.png1.66KB0.90KB▼ 45.94%