84% machete

Code Review | Machete

WordPress plugin Machete scored84%from 54 tests.

About plugin

  • Plugin page: machete
  • Plugin version: 4.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 7, 2016
  • Latest release: Aug 10, 2023
  • Number of updates: 62
  • Update frequency: every 39.8 days
  • Top authors: nilovelez (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

7,000+ active /61,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼2.15ms] Passed 4 tests

A check of server-side resources used by Machete
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4642.46 ▲3.48
Dashboard /wp-admin3.80 ▲0.4552.13 ▼8.10
Posts /wp-admin/edit.php3.85 ▲0.4955.95 ▲10.77
Add New Post /wp-admin/post-new.php6.31 ▲0.4398.50 ▼6.49
Media Library /wp-admin/upload.php3.66 ▲0.4339.60 ▲2.53
Optimization /wp-admin/admin.php?page=machete-cleanup3.6847.34
Analytics & Code /wp-admin/admin.php?page=machete-utils3.6836.27
Social Sharing /wp-admin/admin.php?page=machete-social3.6638.20
Maintenance Mode /wp-admin/admin.php?page=machete-maintenance3.6537.17
Machete Dashboard /wp-admin/admin.php?page=machete3.6739.10
Cookies & GDPR /wp-admin/admin.php?page=machete-cookies3.6844.81

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Machete
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11014.46 ▲0.161.88 ▼0.1241.81 ▼2.43
Dashboard /wp-admin2,248 ▲606.03 ▲1.07109.93 ▲6.0671.57 ▲32.14
Posts /wp-admin/edit.php2,150 ▲612.00 ▲0.0037.26 ▼7.1633.20 ▼2.65
Add New Post /wp-admin/post-new.php1,556 ▲2817.46 ▼5.75713.59 ▲96.4255.29 ▼5.26
Media Library /wp-admin/upload.php1,445 ▲544.14 ▼0.09113.34 ▲7.0047.11 ▲2.85
Optimization /wp-admin/admin.php?page=machete-cleanup1,4561.8831.7540.58
Analytics & Code /wp-admin/admin.php?page=machete-utils1,1743.6753.2244.19
Social Sharing /wp-admin/admin.php?page=machete-social1,0312.0727.1933.14
Maintenance Mode /wp-admin/admin.php?page=machete-maintenance1,0271.8826.4935.25
Machete Dashboard /wp-admin/admin.php?page=machete1,3002.0124.7456.79
Cookies & GDPR /wp-admin/admin.php?page=machete-cookies1,1531.7327.1445.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=machete-utils
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+39
    file_get_contents(wp-content/uploads/machete/header.html): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=machete-utils
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+39
    file_get_contents(wp-content/uploads/machete/footer.html): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=machete-utils
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+39
    file_get_contents(wp-content/uploads/machete/body.html): failed to open stream: No such file or directory

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: css, code, analytics, admin, javascript...

machete/machete.php 92% from 13 tests

The main PHP file in "Machete" ver. 4.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 169 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin6,233 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP337089663,851
PO File13535031,032
CSS9856859
JavaScript7238247
Markdown2440157
SVG160032
HTML30028
XML1173227

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity24.08
▷ Minimum class complexity3.00
▷ Maximum class complexity53.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods85
▷ Static methods00.00%
▷ Public methods5058.82%
▷ Protected methods2630.59%
▷ Private methods910.59%
Functions52
▷ Named functions1325.00%
▷ Anonymous functions3975.00%
Constants12
▷ Global constants12100.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
17 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/social/banner.png1.48KB1.57KB0.00%
inc/woocommerce/icon.png1.86KB1.39KB▼ 25.22%
inc/maintenance/banner.png1.22KB1.22KB0.00%
inc/cleanup/icon.png2.69KB2.06KB▼ 23.13%
img/logo_machete.png4.01KB1.94KB▼ 51.54%