83% mainwp-key-maker

Code Review | MainWP Key Maker

WordPress plugin MainWP Key Maker scored83%from 54 tests.

About plugin

  • Plugin page: mainwp-key-maker
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Oct 31, 2022
  • Number of updates: 30
  • Update frequency: every 86.5 days
  • Top authors: mainwp (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

5,000+ active /36,051 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by MainWP Key Maker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.02 ▼4.15
Dashboard /wp-admin3.30 ▼0.0459.33 ▼13.50
Posts /wp-admin/edit.php3.36 ▲0.0160.18 ▲9.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.54 ▼9.97
Media Library /wp-admin/upload.php3.23 ▼0.0048.04 ▲11.09

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for MainWP Key Maker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲18813.41 ▼1.011.87 ▼0.1440.57 ▼2.82
Dashboard /wp-admin2,315 ▲1154.93 ▲0.03110.17 ▲6.3975.90 ▲34.74
Posts /wp-admin/edit.php2,200 ▲972.16 ▲0.1541.15 ▲3.1835.62 ▲0.45
Add New Post /wp-admin/post-new.php1,618 ▲7225.13 ▲2.06599.30 ▼53.9730.47 ▼21.96
Media Library /wp-admin/upload.php1,534 ▲1344.37 ▲0.20115.66 ▲7.3667.78 ▲17.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • 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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mainwp-key-maker/mainwp-key-maker.php:264

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (The MainWP Key Maker form copy fields) image not found
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

mainwp-key-maker/mainwp-key-maker.php Passed 13 tests

The principal PHP file in "MainWP Key Maker" v. 1.2 is loaded by WordPress automatically on each request
89 characters long description:
Easily convert a form into a "key" to use with the MainWP Bulk Settings Manager Extension

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 plugin470 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP199161419
CSS151649
JavaScript20112

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png21.88KB3.59KB▼ 83.60%
css/images/controls.png1.23KB1.28KB0.00%
css/images/overlay.png0.11KB0.15KB0.00%
css/images/loading_background.png0.13KB0.15KB0.00%
css/images/border.png0.07KB0.10KB0.00%