84% ratingcaptian

Code Review | Ratingcaptain-plugin

WordPress plugin Ratingcaptain-plugin scored84%from 54 tests.

About plugin

  • Plugin page: ratingcaptian
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jul 22, 2021
  • Latest release: May 12, 2022
  • Number of updates: 9
  • Update frequency: every 104.9 days
  • Top authors: mbielak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /960 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Ratingcaptain-plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.01 ▼4.75
Dashboard /wp-admin3.31 ▲0.0150.12 ▲0.39
Posts /wp-admin/edit.php3.37 ▲0.0143.91 ▼2.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.28 ▼16.24
Media Library /wp-admin/upload.php3.24 ▲0.0133.97 ▼2.63
RatingCaptain Page /wp-admin/options-general.php?page=ratingcaptain_settings3.2433.71

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
ratingcaptain_data
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Ratingcaptain-plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.16 ▼0.211.79 ▲0.1443.72 ▲0.27
Dashboard /wp-admin2,199 ▲195.64 ▼0.0690.19 ▼5.2140.54 ▼2.75
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0133.28 ▼7.2335.49 ▼5.38
Add New Post /wp-admin/post-new.php1,533 ▲722.97 ▼0.63688.64 ▼3.0061.17 ▲4.27
Media Library /wp-admin/upload.php1,401 ▲14.15 ▼0.0296.19 ▼14.7641.24 ▼4.82
RatingCaptain Page /wp-admin/options-general.php?page=ratingcaptain_settings8222.0322.4227.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ratingcaptain_data
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ratingcaptian/RatingCaptain-plugin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ratingcaptian/Admin/ratingcaptain_settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: reviews, google_merchant, customer_satisfaction_managment, emails, google_reviews

ratingcaptian/RatingCaptain-plugin.php 85% from 13 tests

The main PHP script in "Ratingcaptain-plugin" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ratingcaptian.php" instead of "RatingCaptain-plugin.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin254 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31323202
Markdown219052

PHP code Passed 2 tests

This is a short overview 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.51
Average class complexity13.00
▷ Minimum class complexity6.00
▷ Maximum class complexity20.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin