89% wp-mechanic

Code Review | WP Mechanic

WordPress plugin WP Mechanic scored 89% from 54 tests.

About plugin

  • Plugin page: wp-mechanic
  • Plugin version: 1.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 25, 2013
  • Latest release: May 2, 2023
  • Number of updates: 90
  • Update frequency: every 40.0 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,670 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.13MB] [CPU: ▼8.77ms] Passed 4 tests

Server-side resources used by WP Mechanic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9646.32 ▲4.61
Dashboard /wp-admin4.12 ▲0.8251.85 ▲6.07
Posts /wp-admin/edit.php4.17 ▲0.8254.05 ▲8.56
Add New Post /wp-admin/post-new.php3.94 ▼1.9444.11 ▼54.33
Media Library /wp-admin/upload.php4.04 ▲0.8241.69 ▲9.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
wm_login_grid_display

Browser metrics Passed 4 tests

Checking browser requirements for WP Mechanic
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲17813.90 ▼0.696.55 ▲4.8335.99 ▼4.16
Dashboard /wp-admin2,215 ▲305.93 ▲0.08100.63 ▲1.0683.65 ▲37.08
Posts /wp-admin/edit.php2,119 ▲302.06 ▲0.0441.28 ▲1.1632.91 ▲1.51
Add New Post /wp-admin/post-new.php1,555 ▲1323.20 ▲5.09677.61 ▲66.5535.69 ▼21.74
Media Library /wp-admin/upload.php1,412 ▲304.19 ▼0.00104.52 ▲4.6044.79 ▲1.30

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • wm_login_grid_display
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-mechanic/index.php 85% from 13 tests

The main PHP file in "WP Mechanic" ver. 1.6.8 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-mechanic.php" instead of "index.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin4,198 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP61,4966213,797
CSS2233203
JavaScript25613198

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity31.88
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods170
▷ Static methods6236.47%
▷ Public methods16194.71%
▷ Protected methods00.00%
▷ Private methods95.29%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.70MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/android-applications/woocommerce-customers.png33.33KB13.61KB▼ 59.17%
images/sample.png9.60KB0.75KB▼ 92.18%
images/android-applications/wp-docs.png163.30KB127.29KB▼ 22.05%
images/android-applications/wordpress-users.png53.69KB19.88KB▼ 62.97%
images/android-applications/wordpress-users-management.png60.77KB21.26KB▼ 65.02%