78% paj-calculator

Code Review | Paj Calculator

WordPress plugin Paj Calculator scored78%from 54 tests.

About plugin

  • Plugin page: paj-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.7
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Mar 16, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: parthug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /297 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.01MB] [CPU: ▼9.26ms] Passed 4 tests

Analyzing server-side resources used by Paj Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.40 ▼4.63
Dashboard /wp-admin3.31 ▲0.0150.35 ▼6.47
Posts /wp-admin/edit.php3.36 ▲0.0147.00 ▼3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.41 ▼22.40
Media Library /wp-admin/upload.php3.24 ▲0.0135.75 ▼0.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Paj Calculator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.34 ▼0.281.73 ▼0.1042.84 ▼2.38
Dashboard /wp-admin2,217 ▲405.78 ▲0.1395.04 ▲1.5939.21 ▼5.49
Posts /wp-admin/edit.php2,122 ▲222.02 ▲0.0444.48 ▲7.2035.54 ▲0.25
Add New Post /wp-admin/post-new.php1,545 ▲1923.43 ▲0.57685.24 ▼8.1136.31 ▼22.73
Media Library /wp-admin/upload.php1,419 ▲194.21 ▼0.02117.05 ▲12.7847.60 ▲1.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/paj-calculator/calculator-ui.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paj-calculator/calculator.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in paj-calculator/assets to your readme.txt
The official readme.txt might help

paj-calculator/calculator.php 92% from 13 tests

The entry point to "Paj Calculator" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paj-calculator.php" instead of "calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected236 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2815150
PHP2111184
CSS2062

PHP code Passed 2 tests

This is a very shot 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.00
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin