83% mhr-post-ticker

Code Review | Mhr Post Ticker

WordPress plugin Mhr Post Ticker scored 83% from 54 tests.

About plugin

  • Plugin page: mhr-post-ticker
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 65
  • Update frequency: every 19.2 days
  • Top authors: mdhadid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 837 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 gracefully, with no errors

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

A check of server-side resources used by Mhr Post Ticker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.86 ▼3.71
Dashboard /wp-admin3.32 ▲0.0244.90 ▼7.36
Posts /wp-admin/edit.php3.37 ▲0.0248.16 ▲2.47
Add New Post /wp-admin/post-new.php5.92 ▲0.0495.14 ▼3.74
Media Library /wp-admin/upload.php3.25 ▲0.0237.78 ▲5.80

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Mhr Post Ticker: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19213.57 ▼0.838.30 ▲6.3343.68 ▼0.81
Dashboard /wp-admin2,222 ▲375.91 ▲1.00106.04 ▲1.6537.30 ▼12.37
Posts /wp-admin/edit.php2,105 ▲162.02 ▼0.0339.28 ▲1.3135.10 ▼2.05
Add New Post /wp-admin/post-new.php1,537 ▲1718.26 ▼4.51596.86 ▼96.7354.78 ▲0.25
Media Library /wp-admin/upload.php1,404 ▲194.24 ▲0.0695.31 ▼2.1341.05 ▼1.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means 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
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_action() in wp-content/plugins/mhr-post-ticker/includes/class-mhr-post-ticker.php:252

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in mhr-post-ticker/assets to your readme.txt
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

mhr-post-ticker/mhr-post-ticker.php 92% from 13 tests

The principal PHP file in "Mhr Post Ticker" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin624 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12179477307
JavaScript26316219
CSS212881
PO File10017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin