84% planetcalc

Code Review | planetcalc

WordPress plugin planetcalc scored84%from 54 tests.

About plugin

  • Plugin page: planetcalc
  • Plugin version: 2.2
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Jun 10, 2014
  • Latest release: Apr 26, 2018
  • Number of updates: 14
  • Update frequency: every 101.1 days
  • Top authors: planetcalc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,240 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.42ms] Passed 4 tests

An overview of server-side resources used by planetcalc
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0067.16 ▼1.74
Dashboard /wp-admin3.31 ▲0.0188.45 ▲0.82
Posts /wp-admin/edit.php3.36 ▲0.0075.34 ▼6.98
Add New Post /wp-admin/post-new.php5.89 ▲0.00146.56 ▲4.99
Media Library /wp-admin/upload.php3.23 ▲0.0061.75 ▲2.22

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for planetcalc
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.33 ▲0.413.25 ▼0.1368.30 ▼10.27
Dashboard /wp-admin2,206 ▲184.89 ▼0.00187.93 ▼13.3889.11 ▲2.29
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0566.91 ▼0.8477.52 ▲0.43
Add New Post /wp-admin/post-new.php1,354 ▼618.15 ▲0.31993.79 ▼8.3574.56 ▼8.65
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.06177.16 ▼8.7994.25 ▲0.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/planetcalc/planetcalc.php:36

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
No tags were found

planetcalc/planetcalc.php Passed 13 tests

Analyzing the main PHP file in "planetcalc" version 2.2
28 characters long description:
Planetcalc calculator widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin43 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP161027
PO File40816

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin