84% peasy-admin

Code Review | Peasy Admin

WordPress plugin Peasy Admin scored84%from 54 tests.

About plugin

  • Plugin page: peasy-admin
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Aug 10, 2017
  • Latest release: Apr 2, 2018
  • Number of updates: 30
  • Update frequency: every 7.9 days
  • Top authors: ggasimzada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Peasy Admin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.65 ▲1.50
Dashboard /wp-admin3.31 ▲0.0144.02 ▼1.51
Posts /wp-admin/edit.php3.43 ▲0.0743.58 ▲3.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.12 ▼11.38
Media Library /wp-admin/upload.php3.24 ▲0.0132.03 ▼3.78

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Peasy Admin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.26 ▼1.131.72 ▼0.2343.37 ▲5.72
Dashboard /wp-admin2,206 ▲174.86 ▼0.11103.22 ▼18.3336.89 ▼7.59
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0136.86 ▼3.0936.08 ▲0.16
Add New Post /wp-admin/post-new.php1,535 ▼1123.45 ▲5.38664.31 ▲51.1356.12 ▲4.23
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.1199.85 ▲5.4744.76 ▲2.81

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/peasy-admin/classes/fields/class-mediafield.php
    • > /wp-content/plugins/peasy-admin/classes/class-field.php
    • > /wp-content/plugins/peasy-admin/classes/fields/class-dropdownfield.php
    • > /wp-content/plugins/peasy-admin/classes/class-option.php
    • > /wp-content/plugins/peasy-admin/classes/class-fieldset.php
    • > /wp-content/plugins/peasy-admin/classes/class-adminpage.php
    • > /wp-content/plugins/peasy-admin/classes/fields/class-checkboxfield.php
    • > /wp-content/plugins/peasy-admin/classes/fields/class-textareafield.php
    • > /wp-content/plugins/peasy-admin/classes/fields/class-customfield.php
    • > /wp-content/plugins/peasy-admin/classes/class-section.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: peasy, options, admin, page, peasy admin...

peasy-admin/peasy-admin.php Passed 13 tests

The entry point to "Peasy Admin" version 1.2.0 is a PHP file that has certain tags in its header comment area
45 characters long description:
An easy-pease API to build custom admin pages

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
There were no executable files found in this plugin574 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14162248472
JavaScript16043
Markdown128038
CSS13021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.08
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods56
▷ Static methods814.29%
▷ Public methods4987.50%
▷ Protected methods23.57%
▷ Private methods58.93%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin