78% contributor-role-for-approved-comments

Code Review | Contributor role for approved comments

WordPress plugin Contributor role for approved comments scored78%from 54 tests.

About plugin

  • Plugin page: contributor-role-...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2014
  • Latest release: Jul 30, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: Hixon10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /707 total downloads

Benchmarks

Plugin footprint 82% 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: ▼8.84ms] Passed 4 tests

A check of server-side resources used by Contributor role for approved comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0350.98 ▲7.92
Dashboard /wp-admin3.36 ▲0.0155.53 ▼12.33
Posts /wp-admin/edit.php3.47 ▲0.1250.13 ▼5.55
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.02 ▼18.34
Media Library /wp-admin/upload.php3.28 ▲0.0539.82 ▲0.87
Contributor role for approved comments /wp-admin/options-general.php?page=contributor-role-for-approved-comments3.2533.06

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/contributor-role-for-approved-comments/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
neededNumberOfApprovalComments
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contributor role for approved comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.22 ▼1.091.77 ▲0.0244.91 ▲4.14
Dashboard /wp-admin2,228 ▲224.87 ▼1.0299.93 ▼5.6339.46 ▼3.96
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0235.39 ▼1.2530.41 ▼10.99
Add New Post /wp-admin/post-new.php1,543 ▲1423.01 ▲5.41660.64 ▲43.7459.27 ▲9.07
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.04108.23 ▲6.6349.03 ▲4.85
Contributor role for approved comments /wp-admin/options-general.php?page=contributor-role-for-approved-comments7972.0724.6326.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • neededNumberOfApprovalComments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/contributor-role-for-approved-comments/public/views/public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/contributor-role-for-approved-comments/admin/views/admin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (This is example of plugin setting page.)
You can take inspiration from this readme.txt

contributor-role-for-approved-comments/contributor-role-for-approved-comments.php Passed 13 tests

The main PHP script in "Contributor role for approved comments" version 0.0.1 is automatically included on every request by WordPress
75 characters long description:
A plugin, which give a contributor role by user for some approval comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected224 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8113329214
JavaScript28210
CSS2020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.00
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods730.43%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png12.57KB5.75KB▼ 54.29%
assets/banner-772x250.png9.79KB4.82KB▼ 50.72%
assets/screenshot-1.png8.62KB5.87KB▼ 31.99%