84% template-part-shortcode

Code Review | Template Part Shortcode

WordPress plugin Template Part Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: template-part-sho...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Nov 9, 2012
  • Latest release: Nov 9, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: MartySpellerberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,539 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Template Part Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.14 ▼0.26
Dashboard /wp-admin3.31 ▼0.0452.78 ▼8.13
Posts /wp-admin/edit.php3.36 ▲0.0045.06 ▲0.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.82 ▼8.06
Media Library /wp-admin/upload.php3.24 ▲0.0033.78 ▲0.31

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Template Part Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.391.78 ▲0.0643.45 ▲4.51
Dashboard /wp-admin2,195 ▲205.62 ▼0.0689.93 ▼8.5540.43 ▼2.38
Posts /wp-admin/edit.php2,097 ▼01.95 ▼0.1333.62 ▼2.0335.90 ▼0.52
Add New Post /wp-admin/post-new.php1,526 ▼323.14 ▼0.53682.12 ▲22.7460.73 ▲5.36
Media Library /wp-admin/upload.php1,397 ▼64.22 ▲0.0796.70 ▼2.3544.00 ▲1.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/template-part-shortcode/template-part-shortcode.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: shortcode, template parts, templates

template-part-shortcode/template-part-shortcode.php Passed 13 tests

The primary PHP file in "Template Part Shortcode" version 0.1 is used by WordPress to initiate all plugin functionality
78 characters long description:
A (very) simple WordPress plugin for embedding template parts in your content.

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
Good job! No executable or dangerous file extensions detected27 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16914
Markdown19013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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