63% admin-page-framework

Code Review | Admin Page Framework

WordPress plugin Admin Page Framework scored 63% from 54 tests.

About plugin

  • Plugin page: admin-page-framework
  • Plugin version: 3.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.9.1
  • WordPress version: 5.8.1
  • First release: Feb 14, 2013
  • Latest release: Mar 2, 2022
  • Number of updates: 463
  • Update frequency: every 7.1 days
  • Top authors: miunosoft (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

200+ active / 47,571 total downloads


Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.59MB] [CPU: ▼150.73ms] 75% from 4 tests

Server-side resources used by Admin Page Framework
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 4,270.96ms on /wp-admin/admin.php?page=apfl_addons)
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.8728.78 ▲6.72
Dashboard /wp-admin4.90 ▲1.8445.94 ▲9.11
Posts /wp-admin/edit.php4.96 ▲1.8542.02 ▲10.26
Add New Post /wp-admin/post-new.php7.26 ▲1.8277.17 ▼625.54
Media Library /wp-admin/upload.php4.84 ▲1.8429.81 ▲6.81
Add Ons /wp-admin/admin.php?page=apfl_addons7.704,270.96
Help /wp-admin/admin.php?page=apfl_contact8.06371.94
Tools /wp-admin/admin.php?page=apfl_tools9.1449.05

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 711 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Admin Page Framework: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10115.44 ▼0.286.65 ▲1.6976.00 ▼0.55
Dashboard /wp-admin2,964 ▲696.12 ▼0.11114.90 ▼26.15185.21 ▲5.76
Posts /wp-admin/edit.php2,742 ▼13.13 ▼0.1168.78 ▼3.86141.73 ▼39.11
Add New Post /wp-admin/post-new.php3,829 ▲1418.65 ▼0.78442.78 ▼9.40163.46 ▼4.45
Media Library /wp-admin/upload.php1,778 ▲265.49 ▼0.02126.35 ▼12.80203.07 ▲17.54
Add Ons /wp-admin/admin.php?page=apfl_addons1,2532.9367.96131.10
Help /wp-admin/admin.php?page=apfl_contact1,5313.3272.07151.06
Tools /wp-admin/admin.php?page=apfl_tools1,7673.7178.40158.27

Uninstaller [IO: ▲4.40MB] [DB: ▲0.01MB] 25% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/admin-page-framework/admin-page-framework-loader.php+228
    Cannot redeclare AdminPageFrameworkLoader_Warning() (previously declared in wp-content/plugins/admin-page-framework/admin-page-framework-loader.php:230)
  • Uninstaller has failed for this plugin, leaving 711 files (4.40MB) in the plugin directory
    • (new file) admin-page-framework-loader.php
    • (new file) asset/css/admin.css
    • (new file) LICENSE.txt
    • (new file) asset/css/column.css
    • (new file) asset/css/help.css
    • (new file) asset/image/demo/wordpress-logo-2x.png
    • (new file) asset/css/field_example.css
    • (new file) asset/css/code.css
    • (new file) asset/css/feed-list.css
    • (new file) asset/css/about.css
    • ...
  • Zombie WordPress options detected upon uninstall: 2 options
    • recovery_mode_email_last_sent
    • admin_page_framework_loader

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
Good news, no errors were detected

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
Please fix the following items
  • 360× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Utility_ArrayGetter' not found in wp-content/plugins/admin-page-framework/library/apf/factory/_common/utility/base_utility/AdminPageFramework_Utility_ArraySetter.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FieldType_select' not found in wp-content/plugins/admin-page-framework/example/library/select2-custom-field-type/Select2CustomFieldType.php:82
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_NetworkAdmin' not found in wp-content/plugins/admin-page-framework/example/network_admin/APF_NetworkAdmin_ManageOptions.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Property_Base' not found in wp-content/plugins/admin-page-framework/library/apf/factory/widget/_model/AdminPageFramework_Property_widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Model__FormSubmission_Base' not found in wp-content/plugins/admin-page-framework/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator_Base.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/admin-page-framework/library/apf/factory/_common/_abstract/_controller/AdminPageFramework_HelpPane_Base.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase' not found in wp-content/plugins/admin-page-framework/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Form_Base' not found in wp-content/plugins/admin-page-framework/library/apf/factory/_common/form/_model/formatter/AdminPageFramework_Form_Model___FormatFieldsets.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FieldType' not found in wp-content/plugins/admin-page-framework/library/apf/factory/_common/form/field_type/hidden/AdminPageFramework_FieldType_hidden.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Model__FormSubmission__Validator_Base' not found in wp-content/plugins/admin-page-framework/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__Import.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (**Text Fields**), #14 (**User Meta Fields**)
You can take inspiration from this readme.txt

admin-page-framework/admin-page-framework-loader.php 92% from 13 tests

The entry point to "Admin Page Framework" version 3.9.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-page-framework.php" instead of "admin-page-framework-loader.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
There were no executable files found in this plugin68,223 lines of code in 637 files:
LanguageFilesBlank linesComment linesLines of code
PO File3297327713

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.15
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes10021.19%
▷ Concrete classes37278.81%
▷ Final classes51.34%
▷ Static methods28513.13%
▷ Public methods1,28159.03%
▷ Protected methods28813.27%
▷ Private methods60127.70%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants13.70%
▷ Class constants2696.30%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.23MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/image/getting_started/my_first_plugin_in_plugin_list_table.png31.58KB13.08KB▼ 58.59%
example/library/path-custom-field-type/asset/img/file_sprite.png18.91KB6.96KB▼ 63.20%
asset/image/getting_started/my_first_plugin.png27.32KB11.07KB▼ 59.49%
example/library/path-custom-field-type/asset/jstree/themes/default/40px.png2.16KB1.84KB▼ 15.12%