84% static-page-template

Code Review | Static Page Template

WordPress plugin Static Page Template scored84%from 54 tests.

About plugin

  • Plugin page: static-page-template
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.0
  • WordPress version: 6.3.1
  • First release: Nov 20, 2014
  • Latest release: Nov 20, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: amitkarmakar13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.65ms] Passed 4 tests

An overview of server-side resources used by Static Page Template
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.57 ▲2.30
Dashboard /wp-admin3.31 ▼0.0343.79 ▼18.21
Posts /wp-admin/edit.php3.36 ▲0.0146.77 ▲2.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.96 ▼13.60
Media Library /wp-admin/upload.php3.23 ▲0.0034.47 ▲3.98

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

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

Browser metrics Passed 4 tests

Static Page Template: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.111.79 ▲0.2351.57 ▲13.13
Dashboard /wp-admin2,198 ▲215.60 ▼0.0684.52 ▼9.7136.59 ▼1.33
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0735.56 ▼2.8231.84 ▼4.88
Add New Post /wp-admin/post-new.php1,526 ▼923.14 ▲5.12611.26 ▼6.50100.65 ▼1.24
Media Library /wp-admin/upload.php1,403 ▲64.17 ▼0.2295.71 ▼2.1442.55 ▲1.55

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/static-page-template/page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/static-page-template/static-page-template.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: theme

static-page-template/static-page-template.php Passed 13 tests

The entry point to "Static Page Template" version 0.0.1 is a PHP file that has certain tags in its header comment area
102 characters long description:
If a page has a custom field named staticpagetemplate, only the page content(html) is sent to browser.

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 plugin23 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25623

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected