84% bowling-calculator

Code Review | Bowling Calculator

WordPress plugin Bowling Calculator scored84%from 54 tests.

About plugin

  • Plugin page: bowling-calculator
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Feb 27, 2022
  • Latest release: Feb 27, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: shahriarprogrammer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /253 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.00MB] [CPU: ▼8.94ms] Passed 4 tests

This is a short check of server-side resources used by Bowling Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.31 ▼1.14
Dashboard /wp-admin3.31 ▲0.0053.43 ▼4.50
Posts /wp-admin/edit.php3.36 ▲0.0048.40 ▼9.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.52 ▼19.37
Media Library /wp-admin/upload.php3.23 ▲0.0036.68 ▼2.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bowling Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.34 ▼0.262.01 ▲0.3046.49 ▲2.18
Dashboard /wp-admin2,192 ▲125.51 ▼0.1595.95 ▼0.8542.34 ▼3.08
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0134.70 ▼3.1533.10 ▼1.58
Add New Post /wp-admin/post-new.php1,535 ▲918.30 ▼4.80612.76 ▼64.2462.58 ▼6.02
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.03105.81 ▼16.4644.39 ▼6.97

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bowling-calculator/includes/bowling_calculator-enqueue.php
    • > /wp-content/plugins/bowling-calculator/bowling_calculator.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #2 (Bowling Calculator Shortcode Placing) image not found
The official readme.txt is a good inspiration

bowling-calculator/bowling_calculator.php 92% from 13 tests

"Bowling Calculator" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bowling-calculator.php" instead of "bowling_calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin699 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2516299
PHP31919168
Sass180119
CSS1230113

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin