84% diving-calculators

Code Review | Diving Calculators

WordPress plugin Diving Calculators scored84%from 54 tests.

About plugin

  • Plugin page: diving-calculators
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Apr 8, 2023
  • Number of updates: 63
  • Update frequency: every 12.4 days
  • Top authors: chonicodefish (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.51ms] Passed 4 tests

A check of server-side resources used by Diving Calculators
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0351.36 ▲11.55
Dashboard /wp-admin3.33 ▲0.0351.01 ▼4.34
Posts /wp-admin/edit.php3.38 ▲0.0249.20 ▲0.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.35 ▼6.65
Media Library /wp-admin/upload.php3.25 ▲0.0238.74 ▲4.94

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Diving Calculators
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.371.81 ▲0.2545.74 ▲0.29
Dashboard /wp-admin2,195 ▲215.63 ▲0.0689.72 ▼3.5239.42 ▼3.27
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0735.45 ▲0.4136.27 ▲0.73
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▲0.20645.00 ▼22.2451.16 ▲0.90
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.05106.11 ▼0.3549.45 ▲0.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • diving_calculators_activation_time
    • widget_recent-posts
    • widget_recent-comments
    • widget_dc
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/diving-calculators/includes/widgets/widgets.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: diving, widget, scuba, calculators

diving-calculators/diving-calculators.php Passed 13 tests

"Diving Calculators" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
26 characters long description:
Diving Calculators Widget.

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
Good job! No executable or dangerous file extensions detected791 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10157433602
PO File15166124
JavaScript15037
CSS28128

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.14
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2385.19%
▷ Protected methods00.00%
▷ Private methods414.81%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin