78% template-list-metabox-by-010pixel

Code Review | Template List Metabox

WordPress plugin Template List Metabox scored78%from 54 tests.

About plugin

  • Plugin page: template-list-met...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9
  • WordPress version: 6.3.1
  • First release: Aug 25, 2014
  • Latest release: Aug 2, 2018
  • Number of updates: 42
  • Update frequency: every 34.9 days
  • Top authors: 010pixel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /6,741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼24.01ms] Passed 4 tests

An overview of server-side resources used by Template List Metabox
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0343.23 ▼4.01
Dashboard /wp-admin3.38 ▼0.0050.21 ▼20.12
Posts /wp-admin/edit.php3.50 ▲0.1048.54 ▼5.97
Add New Post /wp-admin/post-new.php3.23 ▼2.6937.07 ▼65.95
Media Library /wp-admin/upload.php3.31 ▲0.0438.45 ▲0.12
Template List Metabox /wp-admin/options-general.php?page=010pixel_tmplt_list_metabox3.2533.06

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Template List Metabox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.27 ▼0.331.74 ▼0.0743.22 ▼1.12
Dashboard /wp-admin2,199 ▲315.63 ▼0.0691.03 ▼10.8039.32 ▼7.79
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0338.74 ▲2.7934.91 ▲3.58
Add New Post /wp-admin/post-new.php1,529 ▲323.06 ▼0.32657.63 ▲16.7251.19 ▼3.23
Media Library /wp-admin/upload.php1,404 ▲74.17 ▼0.0296.19 ▼4.5642.88 ▼2.82
Template List Metabox /wp-admin/options-general.php?page=010pixel_tmplt_list_metabox8022.0034.3129.73

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • template_post_type_list
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=010pixel_tmplt_list_metabox
    • > 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=010pixel_tmplt_list_metabox
    • > 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please 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 is_admin() in wp-content/plugins/template-list-metabox-by-010pixel/010pixel_tmplt_list_metabox.php:40

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 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:
  • Screenshots: Add images for these screenshots: #1 (Settings in WordPress to choose Custom Post Types), #2 (Sample Template List Metabox)
You can take inspiration from this readme.txt

template-list-metabox-by-010pixel/010pixel_tmplt_list_metabox.php 92% from 13 tests

This is the main PHP file of "Template List Metabox" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("template-list-metabox-by-010pixel.php" instead of "010pixel_tmplt_list_metabox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin159 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16698159

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.67
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png4.83KB2.70KB▼ 44.14%
screenshot-1.png10.69KB5.49KB▼ 48.68%