78% a-function-hitman

Code Review | Function Tweaker

WordPress plugin Function Tweaker scored78%from 54 tests.

About plugin

  • Plugin page: a-function-hitman
  • Plugin version: 2.50
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8
  • WordPress version: 6.3.1
  • First release: Mar 5, 2012
  • Latest release: Aug 1, 2017
  • Number of updates: 34
  • Update frequency: every 58.1 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Function Tweaker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.82 ▼3.49
Dashboard /wp-admin3.33 ▲0.0346.47 ▼0.73
Posts /wp-admin/edit.php3.38 ▲0.0347.73 ▲0.41
Add New Post /wp-admin/post-new.php5.91 ▲0.03126.68 ▲31.49
Media Library /wp-admin/upload.php3.25 ▲0.0335.28 ▼0.41

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Function Tweaker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.47 ▲0.341.71 ▼0.2740.22 ▼6.09
Dashboard /wp-admin2,213 ▲284.87 ▼1.03103.87 ▲1.9238.18 ▼3.92
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.1136.99 ▲0.0839.57 ▲5.47
Add New Post /wp-admin/post-new.php1,536 ▲323.10 ▼0.01663.21 ▼25.9849.48 ▼2.35
Media Library /wp-admin/upload.php1,392 ▲44.23 ▼0.0493.63 ▼7.1242.63 ▲0.02
Function Tweaker /wp-admin/hitman.php260.440.0814.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 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/a-function-hitman/hitman.php:201

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/hitman.php
    • > Network (severe)
    wp-admin/hitman.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Admin page for Function Tweaker) image missing
You can take inspiration from this readme.txt

a-function-hitman/hitman.php 92% from 13 tests

The main PHP file in "Function Tweaker" ver. 2.50 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("a-function-hitman.php" instead of "hitman.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31525219

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Constants1
▷ Global constants1100.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.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png96.93KB29.14KB▼ 69.94%