84% new-blog-templates-replace-preview-links

Code Review | Replace Preview Links of New Blog Templates

WordPress plugin Replace Preview Links of New Blog Templates scored84%from 54 tests.

About plugin

  • Plugin page: new-blog-template...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: May 17, 2014
  • Latest release: May 17, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: diegpl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Replace Preview Links of New Blog Templates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.45 ▲1.41
Dashboard /wp-admin3.31 ▲0.0148.85 ▲1.55
Posts /wp-admin/edit.php3.36 ▲0.0044.73 ▼3.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.34 ▼13.56
Media Library /wp-admin/upload.php3.24 ▲0.0032.30 ▲0.74

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Replace Preview Links of New Blog Templates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.45 ▲0.242.10 ▲0.2744.17 ▼5.56
Dashboard /wp-admin2,206 ▲184.85 ▲0.01113.54 ▼5.3142.00 ▼3.48
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0634.37 ▼6.1831.70 ▼4.95
Add New Post /wp-admin/post-new.php1,543 ▲2918.22 ▲0.66620.89 ▼41.1453.25 ▲3.61
Media Library /wp-admin/upload.php1,391 ▲94.21 ▲0.06102.27 ▲2.6444.35 ▲1.33

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-blog-templates-replace-preview-links/insert-it-at-head.php:18

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (The code that will save you a lot of space in your data-base!) image missing
Please take inspiration from this readme.txt

new-blog-templates-replace-preview-links/insert-it-at-head.php 92% from 13 tests

The main PHP file in "Replace Preview Links of New Blog Templates" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("new-blog-templates-replace-preview-links.php" instead of "insert-it-at-head.php")

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 plugin18 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17211
PHP1497

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.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
No PNG images were found in this plugin