68% admin-options-pages

Code Review | Admin Options Pages

WordPress plugin Admin Options Pages scored68%from 54 tests.

About plugin

  • Plugin page: admin-options-pages
  • Plugin version: 0.9.7
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2019
  • Latest release: Nov 2, 2022
  • Number of updates: 27
  • Update frequency: every 58.6 days
  • Top authors: poolghost (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active /3,707 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲2.21ms] Passed 4 tests

Server-side resources used by Admin Options Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.90 ▼1.92
Dashboard /wp-admin4.05 ▲0.7556.50 ▲6.73
Posts /wp-admin/edit.php4.10 ▲0.7555.80 ▲7.32
Add New Post /wp-admin/post-new.php6.57 ▲0.6897.83 ▼3.03
Media Library /wp-admin/upload.php3.94 ▲0.7141.25 ▲7.07
All Options Pages /wp-admin/admin.php?page=admin_options_pages_master4.2241.16
Settings /wp-admin/admin.php?page=admin_options_pages_settings3.9231.87
Add New /wp-admin/admin.php?page=admin_options_pages_create4.1743.22
Edit Page /wp-admin/admin.php?page=admin_options_pages_edit4.0539.51

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 78 new files
Database: 1 new table, 7 new options
New tables
wp_admin_options_pages
New WordPress options
theysaidso_admin_options
widget_recent-comments
aop_session_handler
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Admin Options Pages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8614.73 ▲0.101.88 ▼0.0442.84 ▲1.62
Dashboard /wp-admin2,228 ▲485.64 ▲0.0588.26 ▼8.1640.00 ▼5.25
Posts /wp-admin/edit.php2,133 ▲331.99 ▲0.0336.65 ▼0.0535.94 ▼4.37
Add New Post /wp-admin/post-new.php1,554 ▲1723.18 ▼2.10658.20 ▼1.6551.25 ▼16.27
Media Library /wp-admin/upload.php1,436 ▲364.14 ▼0.04102.44 ▲2.2942.08 ▼2.41
All Options Pages /wp-admin/admin.php?page=admin_options_pages_master1,1633.8185.5031.43
Settings /wp-admin/admin.php?page=admin_options_pages_settings8152.0325.0726.73
Add New /wp-admin/admin.php?page=admin_options_pages_create1,2684.35100.9942.27
Edit Page /wp-admin/admin.php?page=admin_options_pages_edit1,3564.7056.8426.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_admin_options_pages
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • aop_session_handler
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=admin_options_pages_settings
    • > Notice in wp-content/plugins/admin-options-pages/App/Admin/AdminPages/Settings/SubpageSettings.php+29
    Undefined index: DOCUMENT_URI

SRP 50% from 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
Please take a closer look at the following
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AOP\\App\\Database\\DB' not found in wp-content/plugins/admin-options-pages/App/Data.php:13
    • > PHP Fatal error
      Trait 'AOP\\App\\Singleton' not found in wp-content/plugins/admin-options-pages/App/Admin/AdminPages/AdminPages.php on line 14
    • > PHP Fatal error
      Trait 'AOP\\App\\Singleton' not found in wp-content/plugins/admin-options-pages/App/Enqueue.php on line 5
    • > PHP Fatal error
      Trait 'AOP\\App\\Singleton' not found in wp-content/plugins/admin-options-pages/App/PluginMetaLinks.php on line 8
    • > PHP Fatal error
      Uncaught Error: Interface 'AOP\\Lib\\Illuminate\\Contracts\\Support\\Arrayable' not found in wp-content/plugins/admin-options-pages/Lib/Illuminate/Support/Collection.php:18
    • > PHP Fatal error
      Trait 'AOP\\App\\Options\\Fields\\TraitGeneral' not found in wp-content/plugins/admin-options-pages/App/Options/Fields/RadioButton.php on line 8
    • > PHP Fatal error
      Trait 'AOP\\App\\Options\\Fields\\TraitGeneral' not found in wp-content/plugins/admin-options-pages/App/Options/Fields/Number.php on line 5
    • > PHP Fatal error
      Trait 'AOP\\App\\Options\\Fields\\TraitGeneral' not found in wp-content/plugins/admin-options-pages/App/Options/Fields/Select.php on line 8
    • > PHP Fatal error
      Trait 'AOP\\App\\Options\\Fields\\TraitGeneral' not found in wp-content/plugins/admin-options-pages/App/Options/Fields/Checkbox.php on line 7
    • > PHP Fatal error
      Trait 'AOP\\App\\Options\\Fields\\TraitGeneral' not found in wp-content/plugins/admin-options-pages/App/Options/Fields/WysiwygEditor.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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === admin-options-pages === )
The official readme.txt might help

admin-options-pages/admin-options-pages.php 92% from 13 tests

The principal PHP file in "Admin Options Pages" v. 0.9.7 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,139 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP541,5852,6775,791
CSS5479172,048
SVG300291
JSON1006
JavaScript3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.41
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces11
Interfaces3
Traits4
Classes44
▷ Abstract classes00.00%
▷ Concrete classes44100.00%
▷ Final classes36.82%
Methods445
▷ Static methods11726.29%
▷ Public methods32873.71%
▷ Protected methods408.99%
▷ Private methods7717.30%
Functions159
▷ Named functions00.00%
▷ Anonymous functions159100.00%
Constants29
▷ Global constants00.00%
▷ Class constants29100.00%
▷ Public constants29100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin