84% wp-custom-setting

Code Review | wp custom setting

WordPress plugin wp custom setting scored84%from 54 tests.

About plugin

  • Plugin page: wp-custom-setting
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: Sep 15, 2014
  • Latest release: Sep 15, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: sevy29 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /538 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by wp custom setting
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.84 ▼6.43
Dashboard /wp-admin3.31 ▲0.0144.38 ▼5.35
Posts /wp-admin/edit.php3.36 ▲0.0146.80 ▼2.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.83 ▼10.23
Media Library /wp-admin/upload.php3.24 ▲0.0136.00 ▲3.04
Custom options /wp-admin/options-general.php?page=custom_options_setting3.2528.90

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

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

Browser metrics Passed 4 tests

wp custom setting: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.40 ▲0.031.69 ▼0.2038.27 ▼6.40
Dashboard /wp-admin2,214 ▲264.89 ▼0.96107.98 ▼7.1441.94 ▼2.23
Posts /wp-admin/edit.php2,100 ▲82.04 ▲0.0238.97 ▲2.1037.90 ▲1.38
Add New Post /wp-admin/post-new.php1,538 ▲1018.80 ▲0.06620.18 ▼36.8848.46 ▼10.70
Media Library /wp-admin/upload.php1,399 ▲114.22 ▼0.03100.14 ▼12.5543.40 ▼2.98
Custom options /wp-admin/options-general.php?page=custom_options_setting8881.6826.5028.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=custom_options_setting
    • > Notice in wp-content/plugins/wp-custom-setting/admin-panel.php+15
    Undefined variable: msg

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (settings), #2 (samples)
The official readme.txt might help

wp-custom-setting/wp_custom_settings.php 92% from 13 tests

The principal PHP file in "wp custom setting" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-custom-setting.php" instead of "wp_custom_settings.php")

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
Everything looks great! No dangerous files found in this plugin274 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP29310198
PO File181233
JavaScript115024
CSS15019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png17.78KB9.77KB▼ 45.07%
screenshot-1.png13.60KB6.19KB▼ 54.48%