88% a-function-hitman

Code Review | Function Tweaker

WordPress plugin Function Tweaker scored 88% 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: 5.9.2
  • 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,209 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼296.90ms] Passed 4 tests

Analyzing server-side resources used by Function Tweaker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0360.33 ▼19.15
Dashboard /wp-admin3.44 ▲0.0341.51 ▼0.24
Posts /wp-admin/edit.php3.67 ▲0.0349.68 ▲6.87
Add New Post /wp-admin/post-new.php6.91 ▼0.0698.21 ▼1,165.45
Media Library /wp-admin/upload.php3.32 ▲0.0327.93 ▼2.75

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Function Tweaker: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,769 ▲2716.27 ▲0.986.03 ▼0.302.18 ▲0.05
Dashboard /wp-admin2,895 ▲376.17 ▼0.00156.26 ▲5.56159.79 ▼23.97
Posts /wp-admin/edit.php2,693 ▼13.23 ▼0.0165.25 ▲3.74137.72 ▼1.67
Add New Post /wp-admin/post-new.php1,755 ▼1821.14 ▼0.67427.10 ▼52.83194.89 ▼3.50
Media Library /wp-admin/upload.php1,703 ▲95.54 ▲0.09138.63 ▼13.65225.88 ▲20.78
Function Tweaker /wp-admin/hitman.php260.940.0921.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Admin page for Function Tweaker)
The official readme.txt might help

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

The entry point to "Function Tweaker" version 2.50 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be 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 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected219 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31525219

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! 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

PNG files should be compressed to save space and minimize bandwidth usage
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%