83% admin-dropdown-categories

Code Review | Admin DropDown Categories

WordPress plugin Admin DropDown Categories scored83%from 54 tests.

About plugin

  • Plugin page: admin-dropdown-ca...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 1, 2012
  • Latest release: Nov 1, 2012
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: takumin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,018 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Admin DropDown Categories
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.50 ▼5.02
Dashboard /wp-admin3.33 ▼0.0151.69 ▼16.30
Posts /wp-admin/edit.php3.38 ▲0.0348.08 ▼13.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.74 ▼11.04
Media Library /wp-admin/upload.php3.25 ▲0.0333.43 ▼2.27

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Admin DropDown Categories
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.401.92 ▲0.1346.64 ▲2.25
Dashboard /wp-admin2,197 ▲205.70 ▲0.0084.78 ▼7.0838.38 ▼2.91
Posts /wp-admin/edit.php2,102 ▼12.01 ▲0.0141.10 ▼13.3135.61 ▼2.79
Add New Post /wp-admin/post-new.php6,264 ▲4,73318.73 ▼4.35912.92 ▲286.8171.19 ▲18.98
Media Library /wp-admin/upload.php1,405 ▲84.21 ▲0.01100.57 ▼8.1745.90 ▲3.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/admin-dropdown-categories/admin_dropDown_categories.php:27

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (イメージ) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === admin-dropdown-categories === )
The official readme.txt might help

admin-dropdown-categories/admin_dropDown_categories.php 92% from 13 tests

"Admin DropDown Categories" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-dropdown-categories.php" instead of "admin_dropDown_categories.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin197 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12550113
JavaScript16564
PO File12120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png138.34KB60.77KB▼ 56.07%