62% wp-configuration-and-status

Code Review | WP Configuration and Status

WordPress plugin WP Configuration and Status scored62%from 54 tests.

About plugin

  • Plugin page: wp-configuration-...
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Oct 11, 2017
  • Latest release: Dec 5, 2017
  • Number of updates: 9
  • Update frequency: every 6.1 days
  • Top authors: klickonit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,822 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.94MB] [CPU: ▼37.86ms] Passed 4 tests

A check of server-side resources used by WP Configuration and Status
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0345.89 ▲5.22
Dashboard /wp-admin3.01 ▼0.3024.47 ▼26.25
Posts /wp-admin/edit.php3.01 ▼0.3528.02 ▼24.63
Add New Post /wp-admin/post-new.php3.01 ▼2.8825.11 ▼84.93
Media Library /wp-admin/upload.php3.01 ▼0.2223.24 ▼15.64
WP Configuration and Status /wp-admin/options-general.php?page=klick_cs3.0123.69

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 53 new files
Database: no new tables, 7 new options
New WordPress options
klick-cs-logging
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Configuration and Status
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17413.36 ▼1.299.68 ▲7.7245.70 ▲0.82
Dashboard /wp-admin2,208 ▲285.60 ▼0.0591.42 ▼0.7040.27 ▼3.18
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0438.44 ▼1.7433.65 ▼4.23
Add New Post /wp-admin/post-new.php1,535 ▲923.73 ▲0.59728.81 ▲18.4863.47 ▲6.30
Media Library /wp-admin/upload.php1,410 ▲74.19 ▼0.0297.26 ▼22.3343.90 ▼3.43
WP Configuration and Status /wp-admin/options-general.php?page=klick_cs1,5452.0027.6630.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=klick_cs
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 14× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-commands.php
    • > /wp-content/plugins/wp-configuration-and-status/templates/notices-templates/horizontal-notice.php
    • > /wp-content/plugins/wp-configuration-and-status/wp_configuration_and_staus.php
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-dashboard.php
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-email-logger.php
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-logger.php
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-options.php
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-php-logger.php
    • > /wp-content/plugins/wp-configuration-and-status/includes/class-klick-cs-abstract-logger.php
    • > /wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-change-log.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function file_read() on null in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-htaccess.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function file_read() on null in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-wp-config.php:7
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-wp-config.php on line 7
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-htaccess.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function file_read() on null in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-php-info.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-our-other-plugins.php:3
    • > PHP Warning
      Use of undefined constant KLICK_CS_PLUGIN_URL - assumed 'KLICK_CS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-our-other-plugins.php on line 3
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/wp-configuration-and-status/templates/klick-cs-tab-php-info.php on line 7

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 90% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (php.info Tab), #2 (.htaccess Tab), #3 (wp-config.php Tab)
You can take inspiration from this readme.txt

wp-configuration-and-status/wp_configuration_and_staus.php 85% from 13 tests

The principal PHP file in "WP Configuration and Status" v. 0.0.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-configuration-and-status.php" instead of "wp_configuration_and_staus.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,747 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP21288480804
SVG11011521
CSS61811304
JavaScript4175871
Markdown127047

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods71
▷ Static methods57.04%
▷ Public methods7098.59%
▷ Protected methods00.00%
▷ Private methods11.41%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notices/cs_sample_notice_icon2.png9.63KB4.69KB▼ 51.23%
images/small_icon.png18.12KB0.45KB▼ 97.52%
images/sa-banner.png70.36KB25.74KB▼ 63.41%
images/klick-on-it.png6.51KB4.02KB▼ 38.23%
images/notices/cs_sample_notice_icon3.png30.17KB6.04KB▼ 79.98%