94% farm-calculators

Code Review | Farm-Calculators

WordPress plugin Farm-Calculators scored 94% from 54 tests.

About plugin

  • Plugin page: farm-calculators
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 5.8.1
  • First release: Aug 19, 2013
  • Latest release: Aug 28, 2016
  • Number of updates: 16
  • Update frequency: every 69.0 days
  • Top authors: wingdspur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,265 total downloads


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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼151.00ms] Passed 4 tests

An overview of server-side resources used by Farm-Calculators
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0440.44 ▲3.68
Dashboard /wp-admin3.09 ▲0.0446.61 ▼1.44
Posts /wp-admin/edit.php3.15 ▲0.0444.31 ▼1.91
Add New Post /wp-admin/post-new.php5.45 ▲0.0298.07 ▼604.33
Media Library /wp-admin/upload.php3.04 ▲0.0337.19 ▲7.46

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Farm-Calculators: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲22016.61 ▲1.0712.41 ▲1.2649.18 ▼7.18
Dashboard /wp-admin2,975 ▲445.89 ▼0.18142.39 ▼16.15120.66 ▲3.11
Posts /wp-admin/edit.php2,741 ▲22.70 ▲0.0272.52 ▲3.51102.38 ▲21.82
Add New Post /wp-admin/post-new.php1,685 ▲10418.67 ▲1.48387.31 ▼122.67112.67 ▼21.85
Media Library /wp-admin/upload.php1,809 ▲25.04 ▼0.06157.62 ▲0.02118.26 ▼10.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

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 | 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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/farm-calculators/farm-calculators.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image missing
The official readme.txt is a good inspiration

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

"Farm-Calculators" version 0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
106 characters long description:
Add farm calculators to your website to help users determine various farming and crop related information.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected560 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions14100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.50KB6.18KB▼ 60.15%