78% admin-form-framework

Code Review | Admin Form Framework

WordPress plugin Admin Form Framework scored 78% from 54 tests.

About plugin

  • Plugin page: admin-form-framework
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2014
  • Latest release: Sep 29, 2015
  • Number of updates: 6
  • Update frequency: every 110.3 days
  • Top authors: de-ce (83.33%)Dream Production (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,181 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 gracefully, with no errors

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

A check of server-side resources used by Admin Form Framework
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.40 ▼22.45
Dashboard /wp-admin3.34 ▲0.0444.64 ▼4.45
Posts /wp-admin/edit.php3.45 ▲0.1058.75 ▲13.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.44 ▼4.85
Media Library /wp-admin/upload.php3.26 ▲0.0334.40 ▲0.81

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Form Framework
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.081.86 ▼0.4743.12 ▼23.11
Dashboard /wp-admin2,206 ▲185.92 ▲0.13106.09 ▼8.9538.64 ▼4.30
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0340.98 ▲5.2534.88 ▲1.52
Add New Post /wp-admin/post-new.php1,542 ▲918.29 ▼4.84592.76 ▼80.0552.05 ▲1.93
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.0294.84 ▼9.8142.75 ▼2.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/admin-form-framework/views/select.php
    • > /wp-content/plugins/admin-form-framework/views/description.php
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/admin-form-framework/views/image.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/admin-form-framework/views/checkbox.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_textarea() in wp-content/plugins/admin-form-framework/views/textarea.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_mime_type_icon() in wp-content/plugins/admin-form-framework/views/image.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/admin-form-framework/views/text.php:10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/admin-form-framework/views/select.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/admin-form-framework/views/radio.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/admin-form-framework/views/select.php on line 11
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/admin-form-framework/views/radio.php on line 10
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/admin-form-framework/views/textarea.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: options, settings, custom, development, admin

admin-form-framework/class-aff.php 85% from 13 tests

The principal PHP file in "Admin Form Framework" v. 1.2.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-form-framework.php" instead of "class-aff.php")
  • Description: The description should be shorter than 140 characters (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin595 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1198261423
JavaScript1413172

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin