88% configurator

Code Review | Configurator

WordPress plugin Configurator scored 88% from 53 tests.

About plugin

  • Plugin page: configurator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.2
  • WordPress version: 5.8.1
  • First release: May 8, 2015
  • Latest release: May 9, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: CodeRichard (100%)

Code review

53 tests

User reviews

1 review

Install metrics

100+ active / 1,348 total downloads

Benchmarks

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

This is a short check of server-side resources used by Configurator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.56 ▲10.36
Dashboard /wp-admin3.07 ▲0.0247.21 ▲4.27
Posts /wp-admin/edit.php3.12 ▲0.0239.69 ▼7.17
Add New Post /wp-admin/post-new.php5.44 ▲0.0184.50 ▼1,179.21
Media Library /wp-admin/upload.php3.01 ▲0.0132.59 ▼8.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Configurator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,724 ▲11815.88 ▲0.357.17 ▼1.1146.67 ▲2.48
Dashboard /wp-admin2,978 ▲1255.93 ▲0.08132.65 ▲2.49102.10 ▼3.52
Posts /wp-admin/edit.php2,728 ▲252.69 ▲0.0165.99 ▲0.6184.42 ▼5.02
Add New Post /wp-admin/post-new.php1,868 ▲1519.22 ▲0.11359.82 ▼5.34105.17 ▲1.57
Media Library /wp-admin/upload.php1,794 ▲195.01 ▼0.00152.22 ▲2.82118.09 ▲10.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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 fix the following items
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/configurator/Configurator/class-configurator-parser.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-reader.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-pagerenderer.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-util.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-posthandler.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-line.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-configurator.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-writer.php
    • > /wp-content/plugins/configurator/configurator.php
    • > /wp-content/plugins/configurator/Configurator/class-configurator-setup.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/configurator/views/configurator.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === configurator === )
Please take inspiration from this readme.txt

configurator/configurator.php Passed 13 tests

The entry point to "Configurator" version 1.0 is a PHP file that has certain tags in its header comment area
78 characters long description:
Configurator is a plugin that allows you to edit wp-config.php in the browser.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin327 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP13107124316
CSS11011

PHP code Passed 2 tests

Analyzing 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.23
Average class complexity3.22
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods30
▷ Static methods620.00%
▷ Public methods2480.00%
▷ Protected methods516.67%
▷ Private methods13.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected