84% admin-setting

Code Review | Admin Setting

WordPress plugin Admin Setting scored84%from 54 tests.

About plugin

  • Plugin page: admin-setting
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3
  • WordPress version: 6.3.1
  • First release: Jan 19, 2020
  • Latest release: Jan 19, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: nenwebteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

Server-side resources used by Admin Setting
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.66 ▼1.27
Dashboard /wp-admin3.36 ▲0.0148.07 ▼10.63
Posts /wp-admin/edit.php3.41 ▲0.0545.50 ▼5.78
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.66 ▼18.49
Media Library /wp-admin/upload.php3.28 ▲0.0536.35 ▼0.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
list_menu
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Admin Setting
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.20 ▼1.381.80 ▲0.1840.79 ▼3.87
Dashboard /wp-admin2,226 ▲384.84 ▼0.03101.05 ▼13.1538.82 ▼8.21
Posts /wp-admin/edit.php2,106 ▲172.06 ▲0.0736.27 ▼3.5432.38 ▼6.24
Add New Post /wp-admin/post-new.php1,531 ▲1223.25 ▼0.09693.04 ▲2.9256.43 ▼8.49
Media Library /wp-admin/upload.php1,411 ▲234.22 ▲0.0597.11 ▼8.9643.58 ▼4.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • list_menu

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-setting/index.php:18

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, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Stable tag: No string
The official readme.txt might help

admin-setting/index.php 92% from 13 tests

"Admin Setting" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-setting.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected254 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11613207
CSS10045
JavaScript1102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin