72% wp-fart

Code Review | WP Fart

WordPress plugin WP Fart scored72%from 54 tests.

About plugin

  • Plugin page: wp-fart
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: May 13, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ShaneJones (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼14.10ms] Passed 4 tests

Analyzing server-side resources used by WP Fart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.63 ▼39.79
Dashboard /wp-admin3.32 ▲0.0252.31 ▲7.09
Posts /wp-admin/edit.php3.37 ▲0.0250.67 ▼0.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.40 ▼17.26
Media Library /wp-admin/upload.php3.25 ▲0.0233.85 ▲1.21
WP Fart /wp-admin/options-general.php?page=sdj_admin_template3.1934.00

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Fart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲29413.73 ▼1.027.41 ▲5.4042.99 ▼6.47
Dashboard /wp-admin2,210 ▲254.86 ▼0.22101.92 ▼7.6039.25 ▼5.77
Posts /wp-admin/edit.php2,090 ▼22.06 ▲0.0335.92 ▼2.6832.66 ▼5.88
Add New Post /wp-admin/post-new.php1,536 ▲2223.39 ▲5.95674.30 ▼31.2657.34 ▲3.76
Media Library /wp-admin/upload.php1,392 ▲74.19 ▲0.0494.75 ▼13.4940.93 ▼4.91
WP Fart /wp-admin/options-general.php?page=sdj_admin_template1,1497.17199.0746.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sdj_admin_template
    • > Warning in wp-content/plugins/wp-fart/class-admin.php+111
    Use of undefined constant PLUGIN_URL - assumed 'PLUGIN_URL' (this will throw an Error in a future version of PHP)

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-fart/index.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-fart/class-admin.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=sdj_admin_template
    • > Network (severe)
    http://platform.stumbleupon.com/1/widgets.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=sdj_admin_template
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

wp-fart/index.php 92% from 13 tests

The primary PHP file in "WP Fart" version 1.0 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 ("wp-fart.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin282 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25018114
CSS1110101
JavaScript15167

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin