83% auto-load-page-template

Code Review | Auto Load Page Template

WordPress plugin Auto Load Page Template scored83%from 54 tests.

About plugin

  • Plugin page: auto-load-page-te...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Feb 16, 2022
  • Number of updates: 22
  • Update frequency: every 105.6 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,283 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.01MB] [CPU: ▼3.13ms] Passed 4 tests

Analyzing server-side resources used by Auto Load Page Template
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.50 ▲6.37
Dashboard /wp-admin3.31 ▲0.0146.39 ▼0.56
Posts /wp-admin/edit.php3.36 ▲0.0143.67 ▼3.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.69 ▼13.10
Media Library /wp-admin/upload.php3.24 ▲0.0135.12 ▲4.15

Server storage [IO: ▲0.06MB] [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: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
auto-load-page-template
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Load Page Template
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.231.82 ▲0.2442.75 ▲2.38
Dashboard /wp-admin2,209 ▲205.85 ▲0.88115.31 ▲9.3845.97 ▲2.37
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0133.76 ▼7.3033.57 ▼3.79
Add New Post /wp-admin/post-new.php1,514 ▼023.40 ▲5.70681.43 ▲39.3250.43 ▼8.23
Media Library /wp-admin/upload.php1,388 ▼34.16 ▼0.0693.86 ▼5.0740.79 ▼1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-load-page-template/classes/class.admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/auto-load-page-template/auto-load-page-template.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

auto-load-page-template/auto-load-page-template.php 77% from 13 tests

This is the main PHP file of "Auto Load Page Template" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,465 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32293171,465

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity87.50
▷ Minimum class complexity10.00
▷ Maximum class complexity198.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods98
▷ Static methods11.02%
▷ Public methods8283.67%
▷ Protected methods1616.33%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants27100.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 were not PNG files found in your plugin