89% wpmk-cache

Code Review | WPMK Cache

WordPress plugin WPMK Cache scored89%from 54 tests.

About plugin

  • Plugin page: wpmk-cache
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0
  • WordPress version: 6.3.1
  • First release: Apr 25, 2019
  • Latest release: Jun 19, 2022
  • Number of updates: 4
  • Update frequency: every 288.0 days
  • Top authors: wpmkorg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by WPMK Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.02 ▼0.53
Dashboard /wp-admin3.32 ▼0.0247.56 ▼14.15
Posts /wp-admin/edit.php3.37 ▲0.0253.45 ▲0.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.71 ▼24.62
Media Library /wp-admin/upload.php3.25 ▲0.0235.46 ▼0.37

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPMK Cache
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲2414.72 ▲0.371.65 ▼0.3543.70 ▲2.32
Dashboard /wp-admin2,219 ▲455.59 ▼0.0186.35 ▼6.8737.38 ▼7.52
Posts /wp-admin/edit.php2,118 ▲182.11 ▲0.0937.51 ▼3.4333.04 ▼11.12
Add New Post /wp-admin/post-new.php1,544 ▲1823.16 ▲0.13696.28 ▲16.7462.43 ▲12.23
Media Library /wp-admin/upload.php1,421 ▲244.28 ▲0.0796.19 ▼9.7842.62 ▼7.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Requires php: Invalid plugin version format
  • Screenshots: Please add an image for screenshot #1 (Admin View)
The official readme.txt might help

wpmk-cache/wpmk-cache.php 92% from 13 tests

This is the main PHP file of "WPMK Cache" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin944 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP27481490
PO File5110255315
CSS1120123
JavaScript11016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods39
▷ Static methods12.56%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.34KB17.79KB▼ 43.22%
images/icon.png0.37KB0.37KB0.00%