84% block-ecommerce-assets-via-robots-txt

Code Review | Block eCommerce Assets via robots.txt

WordPress plugin Block eCommerce Assets via robots.txt scored84%from 54 tests.

About plugin

  • Plugin page: block-ecommerce-a...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Sep 23, 2023
  • Number of updates: 17
  • Update frequency: every 65.9 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Block eCommerce Assets via robots.txt
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.04 ▲0.63
Dashboard /wp-admin3.32 ▼0.0247.79 ▼12.06
Posts /wp-admin/edit.php3.37 ▲0.0244.43 ▼4.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.71 ▼2.93
Media Library /wp-admin/upload.php3.25 ▲0.0237.63 ▲2.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Block eCommerce Assets via robots.txt
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.35 ▲0.001.95 ▲0.1843.85 ▲2.51
Dashboard /wp-admin2,198 ▲185.59 ▼0.0894.93 ▲3.0042.11 ▲2.06
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0136.19 ▲0.7333.96 ▲1.63
Add New Post /wp-admin/post-new.php1,526 ▼023.70 ▲0.12604.49 ▼100.8355.76 ▲3.43
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0193.05 ▼12.5341.63 ▼7.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-ecommerce-assets-via-robots-txt/block-ecommerce-assets-robots-txt.php:26

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: seo, robotstxt, robots, robot, crawler...

block-ecommerce-assets-via-robots-txt/block-ecommerce-assets-robots-txt.php 92% from 13 tests

The entry point to "Block eCommerce Assets via robots.txt" version 1.2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("block-ecommerce-assets-via-robots-txt.php" instead of "block-ecommerce-assets-robots-txt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin83 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File16661
PHP153322

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin