94% add-contributors

Code Review | Add Contributors

WordPress plugin Add Contributors scored 94% from 54 tests.

About plugin

  • Plugin page: add-contributors
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3
  • WordPress version: 5.9.2
  • First release: Aug 22, 2019
  • Latest release: Nov 24, 2019
  • Number of updates: 19
  • Update frequency: every 15.5 days
  • Top authors: benjibabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 517 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Add Contributors
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0852.50 ▲2.70
Dashboard /wp-admin3.45 ▲0.0534.33 ▼0.78
Posts /wp-admin/edit.php3.69 ▲0.0539.58 ▲1.82
Add New Post /wp-admin/post-new.php6.96 ▼0.0496.22 ▼1,170.01
Media Library /wp-admin/upload.php3.34 ▲0.0425.36 ▲1.57

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Add Contributors
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲1215.79 ▲0.095.92 ▼0.442.04 ▼0.96
Dashboard /wp-admin2,895 ▲346.13 ▲0.00117.72 ▼28.89155.74 ▼11.43
Posts /wp-admin/edit.php2,691 ▲343.24 ▲0.0162.94 ▼5.64141.67 ▼11.01
Add New Post /wp-admin/post-new.php1,697 ▲3616.62 ▲0.51420.44 ▲5.87170.11 ▲9.44
Media Library /wp-admin/upload.php1,701 ▼05.45 ▼0.07147.32 ▲13.00191.99 ▲3.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/add-contributors/ict101s-contributors.php:51

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)
No browser issues were found

Optimizations

Plugin configuration 93% 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
5 plugin tags: collaboration, list, contributors, helpers, authors

add-contributors/ict101s-contributors.php 85% from 13 tests

"Add Contributors" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("add-contributors.php" instead of "ict101s-contributors.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected235 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP745216186
PO File16825
CSS16024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity7.20
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes5100.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods13
▷ Static methods13100.00%
▷ Public methods969.23%
▷ Protected methods00.00%
▷ Private methods430.77%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.30MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png33.49KB17.06KB▼ 49.06%
assets/icon-128x128.png29.68KB6.55KB▼ 77.95%
assets/screenshot-2.png54.40KB24.33KB▼ 55.28%
assets/banner-772x250.png185.54KB85.58KB▼ 53.88%