83% simple-post-template

Code Review | Simple Content Templates for Blog Posts & Pages

WordPress plugin Simple Content Templates for Blog Posts & Pages scored83%from 54 tests.

About plugin

  • Plugin page: simple-post-template
  • Plugin version: 2.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2008
  • Latest release: Sep 22, 2023
  • Number of updates: 79
  • Update frequency: every 68.9 days
  • Top authors: clifgriffin (83.54%)NodleRedoy (17.72%)

Code review

54 tests

User reviews

22 reviews

Install metrics

2,000+ active /77,872 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.32ms] Passed 4 tests

A check of server-side resources used by Simple Content Templates for Blog Posts & Pages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.88 ▼10.92
Dashboard /wp-admin3.35 ▲0.0545.13 ▼1.64
Posts /wp-admin/edit.php3.47 ▲0.1149.69 ▲2.14
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.72 ▼8.65
Media Library /wp-admin/upload.php3.27 ▲0.0534.44 ▼0.05
Upgrade /wp-admin/edit.php?post_type=act_template&page=sct-upgrade3.2739.12
Content Templates /wp-admin/edit.php?post_type=act_template3.3238.19
Settings /wp-admin/edit.php?post_type=act_template&page=sct-settings3.2933.43
Add Template /wp-admin/post-new.php?post_type=act_template3.4146.29

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 8 new options
New WordPress options
Simple_Content_Templates_settings
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
spt_version
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Simple Content Templates for Blog Posts & Pages: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲9213.69 ▼0.551.88 ▼0.1341.74 ▼3.10
Dashboard /wp-admin2,238 ▲505.80 ▲0.88100.33 ▼15.1441.38 ▲0.23
Posts /wp-admin/edit.php2,124 ▲352.05 ▲0.0040.60 ▲4.0136.31 ▲1.21
Add New Post /wp-admin/post-new.php6,247 ▲4,72821.70 ▼1.53872.06 ▲238.9861.17 ▲1.74
Media Library /wp-admin/upload.php1,423 ▲384.25 ▲0.0497.56 ▼4.1242.25 ▼0.67
Upgrade /wp-admin/edit.php?post_type=act_template&page=sct-upgrade8542.0225.5447.10
Content Templates /wp-admin/edit.php?post_type=act_template1,1221.9331.6930.91
Settings /wp-admin/edit.php?post_type=act_template&page=sct-settings8952.0624.9729.42
Add Template /wp-admin/post-new.php?post_type=act_template2,4247.63169.5861.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • Simple_Content_Templates_settings
    • widget_recent-posts
    • spt_version
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-post-template/admin/partials/advanced-content-templates-admin-sidecar.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WordPress_SimpleSettings' not found in wp-content/plugins/simple-post-template/includes/class-advanced-content-templates.php:30
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_nonce() on null in wp-content/plugins/simple-post-template/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/awesome-plugin-admin.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-post-template/admin/partials/advanced-content-templates-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-post-template/admin/partials/advanced-content-templates-admin-upgrade.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-post-template/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/inc/wordpress-simple-settings.php:179

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 90% 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: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-post-template === )
You can look at the official readme.txt

simple-post-template/simple-content-template.php 85% from 13 tests

The primary PHP file in "Simple Content Templates for Blog Posts & Pages" version 2.2.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-post-template.php" instead of "simple-content-template.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin1,676 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP274271,3791,442
JSON400138
Markdown254096

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.36
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes321.43%
▷ Concrete classes1178.57%
▷ Final classes00.00%
Methods117
▷ Static methods1916.24%
▷ Public methods10993.16%
▷ Protected methods00.00%
▷ Private methods86.84%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants2100.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