94% single-id

Code Review | Single ID

WordPress plugin Single ID scored 94% from 54 tests.

About plugin

  • Plugin page: single-id
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 5.8.1
  • First release: Oct 4, 2013
  • Latest release: Oct 4, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: gezimb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 780 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼138.77ms] Passed 4 tests

This is a short check of server-side resources used by Single ID
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0141.39 ▲6.94
Dashboard /wp-admin3.06 ▲0.0143.72 ▲0.13
Posts /wp-admin/edit.php3.12 ▼0.0044.68 ▼6.09
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.22 ▼552.54
Media Library /wp-admin/upload.php3.01 ▲0.0134.26 ▲3.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Single ID
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6616.02 ▲0.4210.04 ▼3.0750.84 ▲5.64
Dashboard /wp-admin2,967 ▲365.94 ▼0.01155.92 ▲3.90115.86 ▲13.35
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0166.23 ▲0.7298.22 ▼1.43
Add New Post /wp-admin/post-new.php1,672 ▲17218.80 ▲0.25375.34 ▲21.28110.74 ▼0.82
Media Library /wp-admin/upload.php1,804 ▼35.02 ▼0.00157.66 ▲15.16116.24 ▲6.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× 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/single-id/single-id.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/single-id/single-id.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === single-id === )
You can take inspiration from this readme.txt

single-id/single-id.php Passed 13 tests

"Single ID" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
This plugin allows the user to create single-id.php pages where the id corresponds to category id.

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
Good job! No executable or dangerous file extensions detected20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171620

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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