84% the-prospect-farmer

Code Review | The Prospect Farmer

WordPress plugin The Prospect Farmer scored84%from 54 tests.

About plugin

  • Plugin page: the-prospect-farmer
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Jan 7, 2016
  • Number of updates: 10
  • Update frequency: every 26.6 days
  • Top authors: theprospectfarmer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.45ms] Passed 4 tests

This is a short check of server-side resources used by The Prospect Farmer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.07 ▼0.78
Dashboard /wp-admin3.35 ▲0.0146.31 ▼17.80
Posts /wp-admin/edit.php3.40 ▲0.0552.21 ▼6.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.53 ▼13.04
Media Library /wp-admin/upload.php3.28 ▲0.0539.61 ▲2.17
The Prospect Farmer /wp-admin/options-general.php?page=theprospectfarmer3.2435.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theprospectfarmer_flags
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

The Prospect Farmer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.25 ▼0.101.81 ▼0.3242.98 ▼0.88
Dashboard /wp-admin2,202 ▲225.61 ▼0.0587.54 ▼3.3939.10 ▼0.57
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0535.00 ▼7.7338.44 ▼1.06
Add New Post /wp-admin/post-new.php1,532 ▲423.45 ▲0.48692.55 ▲36.3354.56 ▼2.75
Media Library /wp-admin/upload.php1,407 ▲74.19 ▼0.06104.22 ▼7.1546.40 ▼0.49
The Prospect Farmer /wp-admin/options-general.php?page=theprospectfarmer9272.1628.6241.97

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 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • theprospectfarmer_flags
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/the-prospect-farmer/theprospectfarmer.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
The official readme.txt might help

the-prospect-farmer/theprospectfarmer.php 92% from 13 tests

The primary PHP file in "The Prospect Farmer" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("the-prospect-farmer.php" instead of "theprospectfarmer.php")

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
Everything looks great! No dangerous files found in this plugin728 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP211640418
CSS187186
JavaScript217677
PO File1161647

PHP code Passed 2 tests

A short 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.38
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
8 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/shortcoder.png1.24KB1.46KB0.00%
images/shortcoder-2.png0.46KB0.38KB▼ 18.07%
images/aw.png0.43KB0.30KB▼ 30.30%
images/grey-bg.png0.09KB0.15KB0.00%
images/toggle-arrow.png0.25KB0.15KB▼ 42.08%