63% find-pages-by-template

Code Review | Find Pages By Template

WordPress plugin Find Pages By Template scored 63% from 54 tests.

About plugin

  • Plugin page: find-pages-by-tem...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.5
  • WordPress version: 6.3.1
  • First release: May 18, 2017
  • Latest release: May 18, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: nomaki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 772 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.18ms] Passed 4 tests

This is a short check of server-side resources used by Find Pages By Template
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.80 ▼38.72
Dashboard /wp-admin2.07 ▼1.236.62 ▼43.95
Posts /wp-admin/edit.php2.07 ▼1.286.20 ▼41.06
Add New Post /wp-admin/post-new.php2.07 ▼3.815.94 ▼92.97
Media Library /wp-admin/upload.php2.07 ▼1.166.05 ▼27.05
Find Pages By Template /wp-admin/tools.php?page=find-pages-by-template2.075.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Find Pages By Template
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5313.25 ▼1.111.65 ▼0.5147.74 ▲2.79
Dashboard /wp-admin2,209 ▲185.79 ▼0.1097.13 ▼6.5338.58 ▼1.58
Posts /wp-admin/edit.php2,095 ▲242.01 ▲0.0039.26 ▲1.2335.27 ▲1.23
Add New Post /wp-admin/post-new.php1,519 ▼017.54 ▼5.59666.76 ▲6.3365.08 ▲13.84
Media Library /wp-admin/upload.php1,397 ▲124.25 ▲0.07109.54 ▼3.9547.94 ▼0.85
Find Pages By Template /wp-admin/tools.php?page=find-pages-by-template7632.0527.1528.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fpbt handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=find-pages-by-template
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fpbt handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=find-pages-by-template
    • > Notice in wp-content/plugins/find-pages-by-template/find-pages-by-template.php+49
    Undefined index: fpbt_submit
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=find-pages-by-template
    • > Notice in wp-content/plugins/find-pages-by-template/fpbt_admin.php+56
    Undefined variable: pages
    • > GET request to /wp-admin/tools.php?page=find-pages-by-template
    • > Notice in wp-content/plugins/find-pages-by-template/fpbt_admin.php+56
    Undefined variable: template_title

SRP 0% from 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/find-pages-by-template/fpbt_admin.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: template_title in wp-content/plugins/find-pages-by-template/fpbt_admin.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/find-pages-by-template/find-pages-by-template.php:21
    • > PHP Notice
      Undefined variable: pages in wp-content/plugins/find-pages-by-template/fpbt_admin.php on line 32
    • > PHP Notice
      Undefined variable: templates in wp-content/plugins/find-pages-by-template/fpbt_admin.php on line 10
    • > PHP Notice
      Undefined variable: pages in wp-content/plugins/find-pages-by-template/fpbt_admin.php on line 56

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: templates, pages

find-pages-by-template/find-pages-by-template.php Passed 13 tests

The main PHP file in "Find Pages By Template" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
83 characters long description:
Tiny plugin which provides a tool to find which pages are using a specific template

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin151 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21732101
CSS1161050

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin