84% wp-basketjs

Code Review | WP BasketJs

WordPress plugin WP BasketJs scored84%from 54 tests.

About plugin

  • Plugin page: wp-basketjs
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2015
  • Latest release: Aug 16, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: nguyenvanduocit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /846 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP BasketJs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.82 ▼3.94
Dashboard /wp-admin3.31 ▲0.0144.08 ▼9.79
Posts /wp-admin/edit.php3.36 ▲0.0145.94 ▼2.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.38 ▼3.49
Media Library /wp-admin/upload.php3.23 ▲0.0037.07 ▲0.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP BasketJs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,757 ▲118.08 ▼6.466.74 ▲4.7543.83 ▼0.21
Dashboard /wp-admin2,203 ▲124.81 ▼1.11113.12 ▲1.5950.91 ▲10.71
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0638.10 ▼2.5131.21 ▼4.94
Add New Post /wp-admin/post-new.php1,533 ▲1923.14 ▲5.53684.56 ▼1.8659.61 ▲7.64
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.05101.62 ▼4.4941.48 ▼9.82

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-basketjs/wp-basket.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
2 plugin tags: cache, script

wp-basketjs/wp-basket.php 92% from 13 tests

Analyzing the main PHP file in "WP BasketJs" version 1.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-basketjs.php" instead of "wp-basket.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected19 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP123718
JavaScript10101

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected