68% generate-custom-template

Code Review | Generate Custom Template

WordPress plugin Generate Custom Template scored68%from 54 tests.

About plugin

  • Plugin page: generate-custom-t...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Jun 7, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: techdabang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.21ms] Passed 4 tests

Server-side resources used by Generate Custom Template
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.54 ▲3.08
Dashboard /wp-admin3.31 ▲0.0145.61 ▼2.06
Posts /wp-admin/edit.php3.36 ▲0.0146.54 ▲6.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.06 ▼13.04
Media Library /wp-admin/upload.php3.24 ▲0.0135.78 ▲3.19
Author /wp-admin/admin.php?page=generate_template_plugin_author3.2229.57
Listing /wp-admin/admin.php?page=generate_template_plugin_listing3.2330.77
Generate Custom Template /wp-admin/admin.php?page=generate_custom_template3.2629.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: 8 new files
Database: 1 new table, 6 new options
New tables
wp_gct_content
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Generate Custom Template: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.25 ▼1.424.34 ▲2.7839.11 ▼1.93
Dashboard /wp-admin2,237 ▲494.87 ▼0.94110.00 ▼8.7241.07 ▼2.51
Posts /wp-admin/edit.php2,123 ▲372.00 ▼0.0538.78 ▲1.8134.46 ▲4.10
Add New Post /wp-admin/post-new.php1,544 ▲1623.13 ▲4.70673.99 ▲29.0553.63 ▼1.72
Media Library /wp-admin/upload.php1,416 ▲254.21 ▼0.0094.63 ▼5.9240.12 ▼3.02
Author /wp-admin/admin.php?page=generate_template_plugin_author8152.0623.4424.78
Listing /wp-admin/admin.php?page=generate_template_plugin_listing8012.0624.4324.01
Generate Custom Template /wp-admin/admin.php?page=generate_custom_template8402.0623.2327.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_gct_content
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/generate-custom-template/admin/author.php
    • > /wp-content/plugins/generate-custom-template/generate-custom-template.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-custom-template/admin/menu.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: wordpress 521, template, custom template, theme, listing...

generate-custom-template/generate-custom-template.php Passed 13 tests

"Generate Custom Template" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
56 characters long description:
generate custom template using wordpress admin dashboard

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected259 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP64733259

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
PNG images were not found in this plugin