83% jamatto-micropayments

Code Review | Jamatto Micropayments

WordPress plugin Jamatto Micropayments scored83%from 54 tests.

About plugin

  • Plugin page: jamatto-micropaym...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Nov 13, 2017
  • Number of updates: 21
  • Update frequency: every 20.1 days
  • Top authors: jamatto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /983 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.67ms] Passed 4 tests

Analyzing server-side resources used by Jamatto Micropayments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.57 ▼0.92
Dashboard /wp-admin3.39 ▲0.0848.71 ▼3.27
Posts /wp-admin/edit.php3.44 ▲0.0851.22 ▲1.08
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.04 ▼15.58
Media Library /wp-admin/upload.php3.31 ▲0.0835.90 ▲2.51
Jamatto Micropayments /wp-admin/options-general.php?page=jamatto_donations_config3.2833.59

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 21 new options
New WordPress options
FIELD_donation_thanks
theysaidso_admin_options
FIELD_donation_amount
FIELD_bid
FIELD_autodonate
widget_recent-posts
can_compress_scripts
FIELD_premium_color_background
FIELD_donation_prompt
FIELD_premium_color_edge
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jamatto Micropayments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲19313.63 ▼0.9813.66 ▲11.4941.40 ▼3.55
Dashboard /wp-admin2,215 ▲385.69 ▲0.0287.97 ▼6.2038.60 ▼7.36
Posts /wp-admin/edit.php2,120 ▲171.95 ▼0.0437.38 ▲1.4643.39 ▲5.04
Add New Post /wp-admin/post-new.php1,551 ▲1418.25 ▼0.10632.74 ▼1.9571.34 ▲1.95
Media Library /wp-admin/upload.php1,414 ▲174.21 ▲0.03103.03 ▲3.6046.19 ▲4.01
Jamatto Micropayments /wp-admin/options-general.php?page=jamatto_donations_config1,1502.0123.5832.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 21 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • FIELD_premium_amount
    • FIELD_premium_role_exempt
    • FIELD_bid
    • FIELD_premium_color_background
    • FIELD_autodonate
    • db_upgraded
    • FIELD_donation_thanks
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/jamatto-micropayments/jamatto-micropayments.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (As soon as you install the Jamatto plugin, all your existing and future posts will have some default Donate buttons at the bottom of them. You can easily turn this feature off in the Jamatto plugin admin screen.), #2 (This is the Jamatto plugin admin screen. The most important thing to do here is to enter your Jamatto Business ID so that you can keep track of what your blog is earning.), #3 (This is how easy it is to manually add a donate button to your blog posts with the `[jamatto-donate]` shortcode.), #4 (This is what a `[jamatto-donate]` shortcode looks like to your readers.), #5 (This is how easy it is to manually add a premium content section to your blog posts with the `[jamatto-premium]` shortcode.), #6 (This is what your premium content locked up behind a `[jamatto-premium]` shortcode looks like to your readers.), #7 (This is what your premium content looks like once your reader has purchased it.)
You can look at the official readme.txt

jamatto-micropayments/jamatto-micropayments.php 92% from 13 tests

The primary PHP file in "Jamatto Micropayments" version 1.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin409 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17834409

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
7 PNG files occupy 0.53MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png43.71KB21.95KB▼ 49.79%
screenshot-3.png24.57KB14.56KB▼ 40.74%
screenshot-1.png57.06KB26.57KB▼ 53.43%
screenshot-7.png125.73KB68.96KB▼ 45.15%
screenshot-4.png63.80KB30.57KB▼ 52.09%