57% http-requests-tracker

Code Review | HTTP Requests Tracker for WordPress

WordPress plugin HTTP Requests Tracker for WordPress scored57%from 54 tests.

About plugin

  • Plugin page: http-requests-tra...
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2021
  • Latest release: Oct 2, 2021
  • Number of updates: 9
  • Update frequency: every 1.0 days
  • Top authors: krishnasuwal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▲18.87ms] Passed 4 tests

An overview of server-side resources used by HTTP Requests Tracker for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2765.54 ▲21.95
Dashboard /wp-admin3.46 ▲0.1177.36 ▲16.04
Posts /wp-admin/edit.php3.49 ▲0.1484.01 ▲32.29
Add New Post /wp-admin/post-new.php6.07 ▲0.18112.59 ▲5.20
Media Library /wp-admin/upload.php3.38 ▲0.1570.54 ▲34.57

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 1,542 new files
Database: 1 new table, 8 new options
New tables
wp_hrt_logs
New WordPress options
widget_theysaidso_widget
widget_recent-comments
hrt_plugin_version
widget_recent-posts
db_upgraded
hrt_install_date
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

HTTP Requests Tracker for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲13113.43 ▼0.879.11 ▲7.0642.46 ▼0.92
Dashboard /wp-admin2,233 ▲535.65 ▲0.0388.62 ▼11.2238.16 ▼2.59
Posts /wp-admin/edit.php2,148 ▲482.04 ▲0.0339.58 ▲3.0135.92 ▼2.02
Add New Post /wp-admin/post-new.php1,556 ▲2522.11 ▼1.03693.41 ▲87.3256.14 ▲1.73
Media Library /wp-admin/upload.php1,445 ▲454.25 ▲0.0797.69 ▼7.6943.53 ▼0.95
Settings /wp-admin/admin.php?page=hrt#/settings1,11512.55253.3784.01
Stats /wp-admin/admin.php?page=hrt#/stats9208.43276.0557.93
Schemes /wp-admin/admin.php?page=hrt#/schemes1,42612.31133.5250.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_hrt_logs
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • hrt_plugin_version
    • hrt_install_date
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/http-requests-tracker/vendor/illuminate/pagination/resources/views/simple-default.blade.php
    • > /wp-content/plugins/http-requests-tracker/vendor/illuminate/pagination/resources/views/default.blade.php
    • > /wp-content/plugins/http-requests-tracker/vendor/wa72/url/phpunit_bootstrap.php
    • > /wp-content/plugins/http-requests-tracker/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php
    • > /wp-content/plugins/http-requests-tracker/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php
    • > /wp-content/plugins/http-requests-tracker/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php
    • > /wp-content/plugins/http-requests-tracker/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/http-requests-tracker/templates/backend.php
  • 324× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Illuminate\\Support\\Traits\\Macroable' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/database/Eloquent/FactoryBuilder.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/http-requests-tracker/vendor/symfony/translation/Loader/ArrayLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\Arrayable' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/support/Collection.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\Exception' not found in wp-content/plugins/http-requests-tracker/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php:13
    • > PHP Fatal error
      Trait 'Illuminate\\Support\\Traits\\Macroable' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/support/Optional.php on line 8
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/http-requests-tracker/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php:17
    • > PHP Fatal error
      Trait 'Illuminate\\Database\\DetectsLostConnections' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/database/Connectors/Connector.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Schema\\Grammars\\Grammar' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Connectors\\Connector' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/database/Connectors/SQLiteConnector.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/http-requests-tracker/vendor/illuminate/support/Facades/Hash.php:13

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in http-requests-tracker/assets to your readme.txt
The official readme.txt might help

http-requests-tracker/http-requests-tracker.php 85% from 13 tests

The primary PHP file in "HTTP Requests Tracker for WordPress" version 0.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Git Repository: An alternative Git repository was detected

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/http-requests-tracker/vendor/nesbot/carbon/bin/carbon.bat
68,684 lines of code in 1,307 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,24714,16052,75362,695
XSD392482,803
JSON20102,037
Markdown203520872
Blade51119136
reStructuredText1747875
SVG40023
XML22023
YAML1309
JavaScript34327
DOS Batch1004

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.91
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces112
Interfaces136
Traits49
Classes405
▷ Abstract classes256.17%
▷ Concrete classes38093.83%
▷ Final classes369.47%
Methods5,221
▷ Static methods74214.21%
▷ Public methods4,14279.33%
▷ Protected methods95318.25%
▷ Private methods1262.41%
Functions667
▷ Named functions19429.09%
▷ Anonymous functions47370.91%
Constants151
▷ Global constants2013.25%
▷ Class constants13186.75%
▷ Public constants12796.95%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png12.27KB5.16KB▼ 57.92%
(invalid) assets/img/404.png9.00KB0.00KB▼ 100.00%