78% kmm-hacks

Code Review | KMM Hacks

WordPress plugin KMM Hacks scored78%from 54 tests.

About plugin

  • Plugin page: kmm-hacks
  • Plugin version: 0.1.24
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 9, 2018
  • Latest release: Nov 19, 2020
  • Number of updates: 55
  • Update frequency: every 15.2 days
  • Top authors: kronemultimedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.76ms] Passed 4 tests

Server-side resources used by KMM Hacks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.13 ▼3.82
Dashboard /wp-admin3.31 ▼0.0343.59 ▼18.70
Posts /wp-admin/edit.php3.36 ▲0.0146.41 ▲1.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.91 ▼5.97
Media Library /wp-admin/upload.php3.23 ▲0.0136.21 ▲1.83

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for KMM Hacks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.21 ▼1.191.98 ▼0.1945.06 ▼1.28
Dashboard /wp-admin2,203 ▲155.79 ▼0.13103.91 ▼1.2041.30 ▼4.56
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0534.02 ▼7.0132.51 ▲0.26
Add New Post /wp-admin/post-new.php1,533 ▲523.21 ▲5.01681.55 ▲26.9754.67 ▲3.75
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.02101.66 ▲3.1643.30 ▲0.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/kmm-hacks/tests/phpunit/bootstrap.php
  • 97× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/kmm-hacks/tests/test-hacks.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/kmm-hacks/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Stable tag: Empty value
You can take inspiration from this readme.txt

kmm-hacks/kmm-hacks.php Passed 13 tests

The main PHP file in "KMM Hacks" ver. 0.1.24 adds more information about the plugin and also serves as the entry point for this plugin
52 characters long description:
This is a short description of what the plugin does.

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
Good job! No executable or dangerous file extensions detected3,620 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP1146197183,073
JSON300298
Bourne Shell24214146
YAML418264
XML11022
PO File10116
Markdown1101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes104
▷ Abstract classes10.96%
▷ Concrete classes10399.04%
▷ Final classes00.00%
Methods155
▷ Static methods138.39%
▷ Public methods11372.90%
▷ Protected methods3522.58%
▷ Private methods74.52%
Functions20
▷ Named functions420.00%
▷ Anonymous functions1680.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.46MB with 0.46MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/screenshot-3.png83.71KB0.00KB▼ 100.00%
(invalid) assets/screenshot-2.png128.44KB0.00KB▼ 100.00%
(invalid) screen.png116.84KB0.00KB▼ 100.00%
(invalid) assets/screenshot-1.png137.02KB0.00KB▼ 100.00%