84% contributor

Code Review | Contributor

WordPress plugin Contributor scored84%from 54 tests.

About plugin

  • Plugin page: contributor
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Jan 18, 2022
  • Latest release: Mar 12, 2022
  • Number of updates: 7
  • Update frequency: every 7.6 days
  • Top authors: rahulharkhani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.69MB] [CPU: ▼24.22ms] Passed 4 tests

This is a short check of server-side resources used by Contributor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.89 ▼2.83
Dashboard /wp-admin3.32 ▼0.0250.73 ▼14.48
Posts /wp-admin/edit.php3.37 ▲0.0150.16 ▼6.07
Add New Post /wp-admin/post-new.php3.11 ▼2.7834.07 ▼73.50
Media Library /wp-admin/upload.php3.24 ▲0.0137.63 ▲1.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Contributor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9013.31 ▼1.047.17 ▲5.1541.24 ▼0.24
Dashboard /wp-admin2,202 ▲255.63 ▼0.0383.56 ▼7.5640.09 ▲0.45
Posts /wp-admin/edit.php2,086 ▼142.01 ▲0.0735.53 ▼4.7934.14 ▼4.46
Add New Post /wp-admin/post-new.php6,231 ▲4,69425.87 ▲7.78855.91 ▲223.8453.15 ▼13.20
Media Library /wp-admin/upload.php1,407 ▲44.19 ▼0.0597.08 ▼6.6145.54 ▲0.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/contributor/public/partials/contributor-public-display.php
    • > /wp-content/plugins/contributor/admin/partials/contributor-admin-display.php

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === contributor === )
The official readme.txt might help

contributor/contributor.php Passed 13 tests

"Contributor" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Contributor Plugin display just more than one author-name on a post.

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
Success! There were no dangerous files found in this plugin277 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12151540237
CSS21834
JavaScript24546

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.18
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods518.52%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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