62% editor-appearance-access

Code Review | Editor Appearance Access

WordPress plugin Editor Appearance Access scored62%from 54 tests.

About plugin

  • Plugin page: editor-appearance...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Apr 11, 2020
  • Latest release: Apr 11, 2020
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: byronj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /531 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼29.82ms] Passed 4 tests

This is a short check of server-side resources used by Editor Appearance Access
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.08 ▲1.06
Dashboard /wp-admin3.00 ▼0.3022.27 ▼24.17
Posts /wp-admin/edit.php3.00 ▼0.3521.81 ▼21.05
Add New Post /wp-admin/post-new.php3.00 ▼2.8823.93 ▼61.36
Media Library /wp-admin/upload.php3.00 ▼0.2221.77 ▼12.69
Editor Appearance Access /wp-admin/options-general.php?page=beaa-options3.0125.02

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Editor Appearance Access: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.31 ▼1.048.27 ▲6.7544.39 ▲3.97
Dashboard /wp-admin2,200 ▲235.52 ▼0.0080.34 ▼11.5537.88 ▼2.56
Posts /wp-admin/edit.php2,105 ▲82.02 ▼0.1333.52 ▼2.0436.15 ▼0.49
Add New Post /wp-admin/post-new.php1,533 ▼523.15 ▼0.06687.85 ▲40.5858.34 ▼5.22
Media Library /wp-admin/upload.php1,408 ▲114.21 ▼0.01108.06 ▲6.7145.93 ▲0.98
Editor Appearance Access /wp-admin/options-general.php?page=beaa-options8322.0327.5727.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/editor-appearance-access/admin/class-editor-appearance-access-admin-display.php+135
    array_key_exists() expects parameter 2 to be array, bool given
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=beaa-options
    • > Warning in wp-content/plugins/editor-appearance-access/admin/class-editor-appearance-access-admin-display.php+143
    array_key_exists() expects parameter 2 to be array, bool given

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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/editor-appearance-access/public/partials/editor-appearance-access-public-display.php
    • > /wp-content/plugins/editor-appearance-access/admin/partials/editor-appearance-access-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/editor-appearance-access/admin/class-editor-appearance-access-admin-display.php:33

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

editor-appearance-access/editor-appearance-access.php Passed 13 tests

This is the main PHP file of "Editor Appearance Access" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
79 characters long description:
Grants the Editor user role access to selected menus under the Appearance menu.

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 plugin317 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13162572295
CSS24816
JavaScript24546

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin