99% maths-calculator

Code Review | Simple Calculator

WordPress plugin Simple Calculator scored 99% from 53 tests.

About plugin

  • Plugin page: maths-calculator
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 5.8.1
  • First release: Aug 5, 2019
  • Latest release: Nov 19, 2019
  • Number of updates: 28
  • Update frequency: every 3.9 days
  • Top authors: mehtashail (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 397 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Simple Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.44 ▲13.18
Dashboard /wp-admin3.07 ▲0.0145.25 ▲10.45
Posts /wp-admin/edit.php3.12 ▲0.0143.02 ▲0.30
Add New Post /wp-admin/post-new.php5.43 ▲0.0091.88 ▼1,003.42
Media Library /wp-admin/upload.php3.01 ▲0.0034.06 ▼9.91

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Calculator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲9115.87 ▲0.029.64 ▼0.4648.10 ▼0.04
Dashboard /wp-admin2,954 ▲1015.89 ▲0.06140.41 ▲5.86112.14 ▲11.10
Posts /wp-admin/edit.php2,730 ▲242.68 ▼0.0264.97 ▼5.6888.67 ▼8.10
Add New Post /wp-admin/post-new.php1,670 ▼2,00018.48 ▲3.40370.67 ▼95.97106.21 ▼16.72
Media Library /wp-admin/upload.php1,796 ▲245.00 ▼0.00150.72 ▼2.56105.23 ▼14.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 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 Passed 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
The SRP test was a success

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: You can look at the official readme.txt

maths-calculator/wm-calculator-init.php 85% from 13 tests

"Simple Calculator" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("maths-calculator.php" instead of "wm-calculator-init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected179 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3101682
CSS172267
JavaScript16730

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected