84% waves

Code Review | Waves Block

WordPress plugin Waves Block scored 84% from 54 tests.

About plugin

  • Plugin page: waves
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: May 25, 2022
  • Number of updates: 13
  • Update frequency: every 56.5 days
  • Top authors: ajlende (92.31%)oskosk (15.38%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active / 3,151 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Waves Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.98 ▼4.87
Dashboard /wp-admin3.31 ▲0.0143.62 ▼3.16
Posts /wp-admin/edit.php3.37 ▲0.0145.45 ▼1.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.90 ▲5.29
Media Library /wp-admin/upload.php3.24 ▲0.0132.63 ▼3.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Waves Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.23 ▼1.151.83 ▼0.1646.98 ▼2.93
Dashboard /wp-admin2,209 ▲214.87 ▼0.02104.00 ▼16.7439.42 ▼3.30
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0337.73 ▲2.3734.12 ▼0.13
Add New Post /wp-admin/post-new.php6,419 ▲4,87720.79 ▲2.34849.52 ▲202.5056.15 ▲7.10
Media Library /wp-admin/upload.php1,388 ▲34.28 ▲0.0894.48 ▼6.0041.78 ▼5.31

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waves/blocks/waves.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waves/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: block, blocks, waves

waves/index.php 92% from 13 tests

Analyzing the main PHP file in "Waves Block" version 1.0.2
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("waves.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,932 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript38702,7623,825
PHP381657
CSS22241
JSON1009

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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