84% marctv-promoted-comments

Code Review | MarcTV Promoted Comments

WordPress plugin MarcTV Promoted Comments scored84%from 54 tests.

About plugin

  • Plugin page: marctv-promoted-c...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Mar 6, 2016
  • Latest release: Apr 26, 2016
  • Number of updates: 7
  • Update frequency: every 7.3 days
  • Top authors: MarcDK (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /542 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by MarcTV Promoted Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.55 ▼1.68
Dashboard /wp-admin3.32 ▲0.0147.41 ▼8.05
Posts /wp-admin/edit.php3.37 ▲0.0152.77 ▼3.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.79 ▼8.82
Media Library /wp-admin/upload.php3.24 ▲0.0135.84 ▼0.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

MarcTV Promoted Comments: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.461.96 ▼0.0943.28 ▼2.91
Dashboard /wp-admin2,203 ▲155.83 ▲0.98101.51 ▼18.5138.56 ▼7.07
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0135.71 ▼1.5632.53 ▼1.14
Add New Post /wp-admin/post-new.php1,546 ▲1323.38 ▲0.08638.48 ▼55.3058.69 ▲10.26
Media Library /wp-admin/upload.php1,382 ▼34.20 ▲0.0198.77 ▼7.8544.71 ▼1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/marctv-promoted-comments/marctv_promoted_comments.php:26

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: marctv, promoted comments

marctv-promoted-comments/marctv_promoted_comments.php 92% from 13 tests

The main PHP file in "MarcTV Promoted Comments" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("marctv-promoted-comments.php" instead of "marctv_promoted_comments.php")

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 plugin98 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP122955
PO File181239
CSS1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin