88% ebook-watermark-by-dynamicink

Code Review | eBook Watermark by DynamicInk.co

WordPress plugin eBook Watermark by DynamicInk.co scored88%from 54 tests.

About plugin

  • Plugin page: ebook-watermark-b...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Apr 9, 2022
  • Latest release: Dec 7, 2022
  • Number of updates: 11
  • Update frequency: every 22.2 days
  • Top authors: dynamicink (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /861 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.00MB] [CPU: ▼11.35ms] Passed 4 tests

An overview of server-side resources used by eBook Watermark by DynamicInk.co
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0137.32 ▼5.80
Dashboard /wp-admin3.36 ▼0.0347.51 ▼19.71
Posts /wp-admin/edit.php3.41 ▲0.0148.95 ▼2.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0188.20 ▼17.07
Media Library /wp-admin/upload.php3.28 ▲0.0138.38 ▲2.00

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for eBook Watermark by DynamicInk.co
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▲0.061.74 ▼1.0744.15 ▲1.23
Dashboard /wp-admin2,195 ▲215.63 ▲0.0384.28 ▼12.7140.21 ▼1.76
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0434.07 ▼1.6735.32 ▼1.88
Add New Post /wp-admin/post-new.php1,526 ▼023.49 ▲0.56671.52 ▲46.6756.01 ▲6.96
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0598.93 ▼3.0047.96 ▼2.15

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

ebook-watermark-by-dynamicink/dynamicink-integration.php 62% from 13 tests

"eBook Watermark by DynamicInk.co" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ebook-watermark-by-dynamicink.php" instead of "dynamicink-integration.php")
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "5.0")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("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
Success! There were no dangerous files found in this plugin487 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP475124487

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity33.00
▷ Minimum class complexity6.00
▷ Maximum class complexity60.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
assets/icon-256x256.png17.78KB8.17KB▼ 54.06%
assets/banner-772x250.png16.51KB17.71KB0.00%