84% wp-config-constants

Code Review | WP Config Constants

WordPress plugin WP Config Constants scored84%from 54 tests.

About plugin

  • Plugin page: wp-config-constants
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2
  • WordPress version: 6.3.1
  • First release: Aug 31, 2014
  • Latest release: Apr 21, 2015
  • Number of updates: 3
  • Update frequency: every 78.3 days
  • Top authors: MrWiblog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.96ms] Passed 4 tests

An overview of server-side resources used by WP Config Constants
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.87 ▼0.97
Dashboard /wp-admin3.31 ▲0.0149.71 ▼0.78
Posts /wp-admin/edit.php3.36 ▲0.0052.09 ▼4.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.40 ▼13.90
Media Library /wp-admin/upload.php3.23 ▲0.0040.57 ▲2.64
WP Config Constants /wp-admin/options-general.php?page=constants3.2033.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Config Constants
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.59 ▲0.221.71 ▼0.2548.23 ▲2.91
Dashboard /wp-admin2,202 ▲285.63 ▼0.0893.38 ▼0.9037.58 ▼1.51
Posts /wp-admin/edit.php2,104 ▲12.00 ▲0.0137.48 ▼3.2934.78 ▼2.54
Add New Post /wp-admin/post-new.php1,531 ▼020.75 ▼2.46668.98 ▲57.1354.42 ▼7.27
Media Library /wp-admin/upload.php1,404 ▲74.29 ▲0.12105.20 ▼2.6046.99 ▼1.12
WP Config Constants /wp-admin/options-general.php?page=constants1,0421.9923.4926.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-config-constants/wp-config-constants.php:12

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: wp-config, constants, debug, developer, settings

wp-config-constants/wp-config-constants.php Passed 13 tests

The entry point to "WP Config Constants" version 1.0 is a PHP file that has certain tags in its header comment area
68 characters long description:
Shows you the values of constants defined in your wp-config.php file

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
There were no executable files found in this plugin135 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14339135

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
PNG images were not found in this plugin