84% page-keys

Code Review | Page Keys

WordPress plugin Page Keys scored84%from 54 tests.

About plugin

  • Plugin page: page-keys
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: May 26, 2023
  • Number of updates: 9
  • Update frequency: every 333.7 days
  • Top authors: ipm-frommen (66.67%)tfrommen (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /982 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: ▲1.79ms] Passed 4 tests

This is a short check of server-side resources used by Page Keys
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0146.64 ▲3.41
Dashboard /wp-admin3.33 ▲0.0256.54 ▼1.79
Posts /wp-admin/edit.php3.38 ▲0.0254.02 ▲2.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.91 ▲3.78
Media Library /wp-admin/upload.php3.25 ▲0.0241.12 ▲2.83
Page Keys /wp-admin/edit.php?post_type=page&page=page_keys3.2839.17

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Page Keys
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.66 ▲0.351.99 ▲0.2146.76 ▼0.38
Dashboard /wp-admin2,202 ▲255.65 ▼0.0293.36 ▼7.7438.40 ▼3.74
Posts /wp-admin/edit.php2,101 ▲12.05 ▲0.0538.52 ▲2.2735.73 ▲0.54
Add New Post /wp-admin/post-new.php1,548 ▲2223.55 ▲6.03662.62 ▼32.1653.79 ▼10.78
Media Library /wp-admin/upload.php1,404 ▲74.27 ▲0.07113.54 ▼1.7144.18 ▼0.74
Page Keys /wp-admin/edit.php?post_type=page&page=page_keys8492.1228.1428.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-keys/inc/ListTable.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'tf\\PageKeys\\Models\\SettingsErrors\\SettingsError' not found in wp-content/plugins/page-keys/inc/Models/SettingsErrors/InvalidNonce.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'tf\\PageKeys\\Models\\SettingsErrors\\SettingsError' not found in wp-content/plugins/page-keys/inc/Models/SettingsErrors/PageKeyDeleted.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/page-keys/inc/ListTable.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'tf\\PageKeys\\Models\\SettingsErrors\\SettingsError' not found in wp-content/plugins/page-keys/inc/Models/SettingsErrors/DuplicatePageKey.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'tf\\PageKeys\\Models\\SettingsErrors\\SettingsError' not found in wp-content/plugins/page-keys/inc/Models/SettingsErrors/NoPermissionToEdit.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'tf\\PageKeys\\Models\\SettingsErrors\\SettingsError' not found in wp-content/plugins/page-keys/inc/Models/SettingsErrors/MissingPageKey.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'tf\\Autoloader\\Rule' not found in wp-content/plugins/page-keys/inc/Autoloader/NamespaceRule.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'tf\\PageKeys\\Models\\SettingsErrors\\SettingsError' not found in wp-content/plugins/page-keys/inc/Models/SettingsErrors/InvalidPageKey.php:10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/page-keys/inc/ListTable.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: page, pages, keys

page-keys/page-keys.php Passed 13 tests

This is the main PHP file of "Page Keys" version 1.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
112 characters long description:
Register page keys, assign actual WordPress pages to them, and access each of these pages by its individual key.

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
There were no executable files found in this plugin1,111 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP30416767900
JavaScript2273118
PO File1296293

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.56
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods81
▷ Static methods33.70%
▷ Public methods7187.65%
▷ Protected methods44.94%
▷ Private methods67.41%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected