89% configpress

Code Review | ConfigPress

WordPress plugin ConfigPress scored89%from 54 tests.

About plugin

  • Plugin page: configpress
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Oct 7, 2015
  • Number of updates: 5
  • Update frequency: every 4.0 days
  • Top authors: vasyltech (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /3,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲1.15ms] Passed 4 tests

Analyzing server-side resources used by ConfigPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.21 ▲5.27
Dashboard /wp-admin3.35 ▲0.0450.29 ▼2.28
Posts /wp-admin/edit.php3.40 ▲0.0454.45 ▲3.43
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.53 ▲0.53
Media Library /wp-admin/upload.php3.27 ▲0.0436.76 ▲2.93
ConfigPress /wp-admin/options-general.php?page=configpress3.2832.61

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ConfigPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.26 ▼0.982.11 ▲0.4745.14 ▼7.49
Dashboard /wp-admin2,210 ▲224.81 ▼0.10112.78 ▼10.5145.73 ▲0.37
Posts /wp-admin/edit.php2,093 ▲12.02 ▼0.0339.06 ▲0.2141.69 ▲8.03
Add New Post /wp-admin/post-new.php1,517 ▼2517.71 ▼4.99700.94 ▲103.2359.65 ▲9.14
Media Library /wp-admin/upload.php1,386 ▲44.22 ▲0.02100.03 ▲0.2442.95 ▲0.45
ConfigPress /wp-admin/options-general.php?page=configpress9812.3640.3839.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Simple configurations example), #2 (Simple configurations example with error)
The official readme.txt is a good inspiration

configpress/config-press.php 92% from 13 tests

The entry point to "ConfigPress" version 0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("configpress.php" instead of "config-press.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin7,958 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript38539507,178
PHP4117401425
CSS25938323
PO File16630
SVG2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.00
▷ Minimum class complexity10.00
▷ Maximum class complexity36.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods413.79%
▷ Public methods1758.62%
▷ Protected methods1241.38%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png71.47KB19.42KB▼ 72.82%
screenshot-1.png65.04KB17.47KB▼ 73.14%
stylesheet/images/logo.png0.73KB0.71KB▼ 2.28%