84% administrator-z

Code Review | Administrator Z

WordPress plugin Administrator Z scored 84% from 54 tests.

About plugin

  • Plugin page: administrator-z
  • Plugin version: 2.7.14
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.9.2
  • First release: Dec 29, 2020
  • Latest release: Mar 16, 2022
  • Number of updates: 96
  • Update frequency: every 4.6 days
  • Top authors: quyle91 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active / 10,329 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.60MB] [CPU: ▼291.60ms] Passed 4 tests

This is a short check of server-side resources used by Administrator Z
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.89 ▲1.3764.54 ▲10.14
Dashboard /wp-admin4.86 ▲1.4552.03 ▲11.79
Posts /wp-admin/edit.php5.09 ▲1.4555.32 ▲9.78
Add New Post /wp-admin/post-new.php5.10 ▼1.8761.81 ▼1,198.10
Media Library /wp-admin/upload.php4.81 ▲1.5072.13 ▲39.96
Administrator Z /wp-admin/tools.php?page=adminz7.4365.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,771 new files
Database: no new tables, 8 new options
New WordPress options
adminz_flatsome
adminz_default
adminz_enqueue
adminz_woocommerce
adminz_db_version
adminz_security
adminz_contactgroup
adminz_mailer

Browser metrics Passed 4 tests

This is an overview of browser requirements for Administrator Z
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,963 ▲22117.34 ▲1.696.17 ▲0.362.69 ▲0.74
Dashboard /wp-admin3,092 ▲2318.00 ▲1.85137.69 ▲1.70154.98 ▼8.78
Posts /wp-admin/edit.php2,920 ▲2325.16 ▲1.9276.16 ▲13.34140.31 ▼5.96
Add New Post /wp-admin/post-new.php4,044 ▲2,2849.67 ▼12.73187.80 ▼237.23203.39 ▲53.49
Media Library /wp-admin/upload.php1,703 ▲85.51 ▼0.01108.07 ▼27.71181.83 ▼12.08
Administrator Z /wp-admin/tools.php?page=adminz1,9164.2768.64170.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • adminz_default
    • adminz_db_version
    • adminz_contactgroup
    • adminz_woocommerce
    • adminz_mailer
    • adminz_enqueue
    • adminz_security
    • adminz_flatsome

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 41× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/administrator-z/shortcodes/woocommerce-form.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/administrator-z/shortcodes/flatsome-readmore-readless.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/administrator-z/shortcodes/flatsome-facebookpage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/administrator-z/shortcodes/flatsome-slider-new.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/administrator-z/shortcodes/woocommerce-quick-order.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/administrator-z/inc/widget/class-adminz-inc-widget-filter-product-taxonomy.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Adminz\\Admin\\Adminz' not found in wp-content/plugins/administrator-z/admin/class-adminz-othertools.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Adminz\\Admin\\ADMINZ_DefaultOptions' not found in wp-content/plugins/administrator-z/shortcodes/otheroptions-countview.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/administrator-z/shortcodes/elementor-posts.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/administrator-z/shortcodes/elementor-test.php:8

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

administrator-z/administrator-z.php 92% from 13 tests

The main PHP script in "Administrator Z" version 2.7.14 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin77,794 lines of code in 1,725 files:
LanguageFilesBlank linesComment linesLines of code
SVG1,6393961,14024,868
HTML32,102117,774
PHP581,3311,57817,312
JavaScript95,1366,97017,111
CSS169546729

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity43.26
▷ Minimum class complexity1.00
▷ Maximum class complexity200.00
Average method complexity4.95
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods272
▷ Static methods5520.22%
▷ Public methods25894.85%
▷ Protected methods93.31%
▷ Private methods51.84%
Functions154
▷ Named functions5032.47%
▷ Anonymous functions10467.53%
Constants11
▷ Global constants436.36%
▷ Class constants763.64%
▷ Public constants7100.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
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/leaflet/images/layers.png0.68KB1.05KB0.00%
assets/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%
assets/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
assets/fotorama/fotorama.png3.15KB3.22KB0.00%
assets/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%