83% my-right-horse

Code Review | My Right Horse

WordPress plugin My Right Horse scored83%from 54 tests.

About plugin

  • Plugin page: my-right-horse
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2018
  • Latest release: Oct 2, 2019
  • Number of updates: 13
  • Update frequency: every 31.8 days
  • Top authors: therighthorse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,072 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.04MB] [CPU: ▼9.94ms] Passed 4 tests

This is a short check of server-side resources used by My Right Horse
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6644.95 ▲3.63
Dashboard /wp-admin3.98 ▲0.6752.82 ▲3.84
Posts /wp-admin/edit.php4.02 ▲0.6662.39 ▲15.53
Add New Post /wp-admin/post-new.php3.76 ▼2.1338.55 ▼53.18
Media Library /wp-admin/upload.php3.87 ▲0.6442.36 ▲5.95

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 165 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

My Right Horse: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,034 ▲28815.48 ▲1.361.93 ▼0.2442.58 ▼1.68
Dashboard /wp-admin2,443 ▲2556.99 ▲1.13136.37 ▲14.8238.08 ▼8.09
Posts /wp-admin/edit.php2,349 ▲2603.90 ▲1.9060.04 ▲22.3536.10 ▲2.72
Add New Post /wp-admin/post-new.php1,603 ▲7023.57 ▲2.46662.91 ▼85.1136.64 ▼18.80
Media Library /wp-admin/upload.php1,485 ▲974.77 ▲0.5085.64 ▼28.7244.33 ▼2.62

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/my-right-horse/functions/custom_functions.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cs_get_option() in wp-content/plugins/my-right-horse/templates/shortcode-list.php:2

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: my right horse, horse listing

my-right-horse/myrighthorse.php 77% from 13 tests

"My Right Horse" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("my-right-horse.php" instead of "myrighthorse.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/l10n")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin48,946 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
JSON50029,007
JavaScript131,0898194,629
CSS9166794,341
PHP491,2802,4193,057
Sass8424452,748
SVG1002,671
Vuejs Component9109811,780
PO File7306334705
Markdown1608

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.56
Average class complexity13.91
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes26.25%
▷ Concrete classes3093.75%
▷ Final classes00.00%
Methods99
▷ Static methods55.05%
▷ Public methods99100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions49
▷ Named functions4897.96%
▷ Anonymous functions12.04%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
39 PNG files occupy 0.45MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/btn-light-rounded.png1.20KB1.05KB▼ 12.65%
assets/screenshot-1.PNG48.84KB13.17KB▼ 73.03%
images/chosen-sprite@2x.png0.72KB0.83KB0.00%
dist/images/btn-light-pill.png1.91KB1.52KB▼ 20.77%
assets/images/3-column.png6.35KB1.40KB▼ 77.93%