78% leira-access

Code Review | Access

WordPress plugin Access scored78%from 54 tests.

About plugin

  • Plugin page: leira-access
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.3
  • WordPress version: 6.3.1
  • First release: Oct 15, 2019
  • Latest release: Nov 16, 2019
  • Number of updates: 20
  • Update frequency: every 1.8 days
  • Top authors: arielhr1987 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /691 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▲2.18ms] Passed 4 tests

A check of server-side resources used by Access
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1943.28 ▲4.39
Dashboard /wp-admin3.68 ▲0.3847.23 ▼2.33
Posts /wp-admin/edit.php3.73 ▲0.3849.03 ▲3.22
Add New Post /wp-admin/post-new.php6.20 ▲0.3292.77 ▲9.04
Media Library /wp-admin/upload.php3.54 ▲0.3138.58 ▲3.42

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Access
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲15313.62 ▼0.775.26 ▲3.5644.92 ▲1.23
Dashboard /wp-admin2,211 ▲224.82 ▼0.15110.21 ▼4.7939.06 ▼3.22
Posts /wp-admin/edit.php2,189 ▲1002.16 ▲0.1942.38 ▲1.1934.38 ▼0.86
Add New Post /wp-admin/post-new.php6,284 ▲4,77019.08 ▲1.40915.59 ▲235.9154.06 ▲2.47
Media Library /wp-admin/upload.php1,393 ▲54.19 ▼0.0499.24 ▼0.3841.98 ▼3.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/leira-access/public/partials/leira-access-public-display.php
    • > /wp-content/plugins/leira-access/admin/partials/leira-access-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/leira-access/admin/class-leira-access-walker-nav-menu-edit.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Basic)
The official readme.txt is a good inspiration

leira-access/leira-access.php Passed 13 tests

The principal PHP file in "Access" v. 1.0.4 is loaded by WordPress automatically on each request
104 characters long description:
Restrict your users access to different site sections like navs, widgets, blocks, pages, categories etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,637 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP245121,5491,212
JavaScript558295247
Sass1277111
CSS28967

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.16
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods100
▷ Static methods33.00%
▷ Public methods9393.00%
▷ Protected methods66.00%
▷ Private methods11.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected