78% accesstype

Code Review | AccessType

WordPress plugin AccessType scored78%from 54 tests.

About plugin

  • Plugin page: accesstype
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-5.8
  • WordPress version: 6.3.1
  • First release: Sep 16, 2020
  • Latest release: Nov 17, 2021
  • Number of updates: 30
  • Update frequency: every 14.2 days
  • Top authors: accesstype (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.54MB] [CPU: ▼17.59ms] Passed 4 tests

An overview of server-side resources used by AccessType
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1643.20 ▲1.53
Dashboard /wp-admin3.48 ▲0.1450.62 ▼4.08
Posts /wp-admin/edit.php3.60 ▲0.2050.49 ▼3.14
Add New Post /wp-admin/post-new.php3.36 ▼2.5738.26 ▼62.08
Media Library /wp-admin/upload.php3.41 ▲0.1436.89 ▼1.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 13 new options
New WordPress options
accesstype-env
db_upgraded
accesstype-plan-heading
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
accesstype-lead-in-elements
widget_recent-comments
accesstype-secondary-color
widget_recent-posts
...

Browser metrics Passed 4 tests

AccessType: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲15013.93 ▼0.4212.33 ▲10.4140.32 ▼6.30
Dashboard /wp-admin2,268 ▲885.80 ▲0.1991.89 ▼0.3436.79 ▼0.82
Posts /wp-admin/edit.php2,264 ▲1642.34 ▲0.3238.87 ▼2.8334.79 ▼1.38
Add New Post /wp-admin/post-new.php6,289 ▲4,76126.31 ▲3.09911.44 ▲247.1963.83 ▲7.44
Media Library /wp-admin/upload.php1,480 ▲804.47 ▲0.24100.22 ▼2.6240.68 ▼2.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • accesstype-plan-sub-heading
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • accesstype-plan-heading
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/accesstype/accesstype.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accesstype/includes/functions/metaboxes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/accesstype/includes/functions/accesstype_admin.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/accesstype/includes/functions/accesstype_visibility.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/accesstype/includes/functions/functions.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accesstype/includes/apis.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/accesstype/includes/shortcodes.php:41

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in accesstype/assets to your readme.txt
Please take inspiration from this readme.txt

accesstype/accesstype.php 92% from 13 tests

The entry point to "AccessType" version 1.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Success! There were no dangerous files found in this plugin1,258 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13158386989
CSS1310151
JavaScript41617118

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity4.89
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods844.44%
▷ Protected methods00.00%
▷ Private methods1055.56%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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