84% fake-admin

Code Review | Fake Admin

WordPress plugin Fake Admin scored84%from 54 tests.

About plugin

  • Plugin page: fake-admin
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Apr 26, 2023
  • Latest release: Apr 27, 2023
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: pigeonposse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /178 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.09MB] [CPU: ▼3.47ms] Passed 4 tests

A check of server-side resources used by Fake Admin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0949.41 ▲13.64
Dashboard /wp-admin3.39 ▲0.0848.19 ▼0.90
Posts /wp-admin/edit.php3.50 ▲0.1450.44 ▲2.43
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.10 ▼13.67
Media Library /wp-admin/upload.php3.31 ▲0.0833.66 ▼1.73

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Fake Admin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.35 ▼0.031.78 ▲0.1842.94 ▲0.28
Dashboard /wp-admin2,212 ▲325.64 ▲0.0385.37 ▼2.9069.67 ▲26.34
Posts /wp-admin/edit.php2,118 ▲182.00 ▲0.0638.62 ▲0.5535.98 ▲1.86
Add New Post /wp-admin/post-new.php1,622 ▲8424.63 ▲1.44672.92 ▼14.6652.63 ▼7.07
Media Library /wp-admin/upload.php1,411 ▲114.14 ▼0.11102.17 ▲7.1666.39 ▲19.29

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PigeonPosse\\FakeAdmin\\Inc\\Core' not found in wp-content/plugins/fake-admin/src/inc/FakeAdmin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fake-admin/fake-admin.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: roles, security, users, administrator, admin...

fake-admin/fake-admin.php 92% from 13 tests

The main PHP file in "Fake Admin" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 224 characters long)

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
No dangerous file extensions were detected816 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP17237522745
PO File2181866
JSON1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity14.50
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods2037.04%
▷ Public methods4685.19%
▷ Protected methods47.41%
▷ Private methods47.41%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/assets/img/logo.png6.05KB2.73KB▼ 54.89%