78% cs-page-templates-info

Code Review | Cleanscript - Page Templates Info

WordPress plugin Cleanscript - Page Templates Info scored78%from 54 tests.

About plugin

  • Plugin page: cs-page-templates...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2015
  • Latest release: Mar 3, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: cleanscript (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,500 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.02MB] [CPU: ▼6.44ms] Passed 4 tests

Analyzing server-side resources used by Cleanscript - Page Templates Info
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.51 ▼4.71
Dashboard /wp-admin3.33 ▲0.0243.71 ▼7.60
Posts /wp-admin/edit.php3.38 ▲0.0245.85 ▼3.62
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.83 ▼9.83
Media Library /wp-admin/upload.php3.25 ▲0.0233.99 ▲1.29
Page Templates Info /wp-admin/options-general.php?page=cs_page_templates_info3.1934.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Cleanscript - Page Templates Info
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.61 ▼0.761.71 ▼0.1643.99 ▲1.27
Dashboard /wp-admin2,217 ▲324.89 ▲0.00110.43 ▼1.6841.47 ▼2.04
Posts /wp-admin/edit.php2,098 ▲92.03 ▼0.1040.75 ▼0.3834.47 ▼3.75
Add New Post /wp-admin/post-new.php1,533 ▲1923.16 ▲5.64639.66 ▲8.2863.75 ▲9.29
Media Library /wp-admin/upload.php1,397 ▲94.20 ▲0.0098.59 ▼1.3242.11 ▼1.65
Page Templates Info /wp-admin/options-general.php?page=cs_page_templates_info7812.0723.5727.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=cs_page_templates_info
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=cs_page_templates_info
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cs-page-templates-info/cs_page_templates_info.php:110

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: information, page, templates

cs-page-templates-info/cs_page_templates_info.php 85% from 13 tests

The primary PHP file in "Cleanscript - Page Templates Info" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cs-page-templates-info.php" instead of "cs_page_templates_info.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)

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 detected133 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12237113
JavaScript14120

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png114.34KB31.80KB▼ 72.18%