90% wp-api-page-template

Code Review | WP API Page template

WordPress plugin WP API Page template scored90%from 54 tests.

About plugin

  • Plugin page: wp-api-page-template
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5
  • WordPress version: 6.3.1
  • First release: Apr 27, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: oleg2tor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /567 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by WP API Page template
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.64 ▼6.19
Dashboard /wp-admin3.31 ▲0.0148.74 ▼2.74
Posts /wp-admin/edit.php3.36 ▲0.0150.52 ▼2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.25 ▼14.28
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲0.69

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

WP API Page template: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.011.69 ▼0.3238.39 ▼10.00
Dashboard /wp-admin2,203 ▲155.78 ▼0.07107.15 ▼4.8838.04 ▼10.55
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0241.17 ▲2.6033.96 ▼3.76
Add New Post /wp-admin/post-new.php1,514 ▼517.40 ▼5.67604.05 ▼74.5451.34 ▼1.73
Media Library /wp-admin/upload.php1,391 ▼04.20 ▲0.0295.87 ▼5.7342.27 ▼1.13

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: wp-api, template, rest, wp-api-page-template, page-template...

wp-api-page-template/wp-rest-api-page-template.php 92% from 13 tests

The main file in "WP API Page template" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-api-page-template.php" instead of "wp-rest-api-page-template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192121

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin