72% permit-press-access-codes

Code Review | Press Permit Access Codes

WordPress plugin Press Permit Access Codes scored72%from 54 tests.

About plugin

  • Plugin page: permit-press-acce...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2014
  • Latest release: Sep 14, 2014
  • Number of updates: 6
  • Update frequency: every 26.5 days
  • Top authors: slickorange (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /877 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.20ms] Passed 4 tests

A check of server-side resources used by Press Permit Access Codes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.02 ▲5.42
Dashboard /wp-admin3.32 ▲0.0244.14 ▼4.27
Posts /wp-admin/edit.php3.37 ▲0.0243.15 ▼1.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.78 ▼8.76
Media Library /wp-admin/upload.php3.24 ▲0.0237.20 ▲6.80
PP Access Codes /wp-admin/options-general.php?page=pp-access-codes3.2128.78

Server storage [IO: ▲0.01MB] [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: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
recovery_mode_email_last_sent
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Press Permit Access Codes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.201.71 ▲0.0643.83 ▲0.32
Dashboard /wp-admin2,210 ▲354.89 ▼0.08101.27 ▼23.0138.65 ▼6.14
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0135.33 ▼1.6634.23 ▲2.14
Add New Post /wp-admin/post-new.php1,536 ▲2223.16 ▲5.53681.83 ▲11.8853.59 ▼1.94
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.02111.05 ▲11.3348.05 ▲1.91
PP Access Codes /wp-admin/options-general.php?page=pp-access-codes7171.146.8424.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=pp-access-codes
    • > Error in wp-content/plugins/permit-press-access-codes/press-permit-access-codes.php+56
    Uncaught Error: Call to undefined function pp_get_groups() in wp-content/plugins/permit-press-access-codes/press-permit-access-codes.php:56
    Stack trace:
    #0 wp-content/plugins/permit-press-access-codes/options-page.php(26): pp_access_codes_groups_drop_down()
    #1 wp-content/plugins/permit-press-access-codes/press-permit-access-codes.php(51): require('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): pp_access_codes_options_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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/permit-press-access-codes/front-end.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/permit-press-access-codes/press-permit-access-codes.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pp_access_codes_groups_drop_down() in wp-content/plugins/permit-press-access-codes/options-page.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/permit-press-access-codes/press-permit-access-codes.php:27

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === permit-press-access-codes === )
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt might help

permit-press-access-codes/press-permit-access-codes.php 92% from 13 tests

The entry point to "Press Permit Access Codes" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("permit-press-access-codes.php" instead of "press-permit-access-codes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected152 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35614152

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin