89% wp-tinycampaign-widget

Code Review | WP tinyCampaign Widget

WordPress plugin WP tinyCampaign Widget scored 89% from 54 tests.

About plugin

  • Plugin page: wp-tinycampaign-w...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.7.2
  • WordPress version: 5.8.1
  • First release: Jan 10, 2013
  • Latest release: Feb 15, 2017
  • Number of updates: 5
  • Update frequency: every 299.4 days
  • Top authors: parkerj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 731 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
Install script ran successfully

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

An overview of server-side resources used by WP tinyCampaign Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0141.31 ▼2.02
Dashboard /wp-admin3.07 ▲0.0152.30 ▼3.43
Posts /wp-admin/edit.php3.12 ▲0.0145.93 ▼4.97
Add New Post /wp-admin/post-new.php5.43 ▼0.01107.20 ▼557.65
Media Library /wp-admin/upload.php3.01 ▲0.0143.44 ▲7.25

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_tinyc-widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP tinyCampaign Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.83 ▲0.3211.19 ▲0.0954.46 ▲0.57
Dashboard /wp-admin2,961 ▲285.95 ▲0.01184.15 ▲8.03128.92 ▼1.86
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0064.92 ▼12.1986.27 ▼14.99
Add New Post /wp-admin/post-new.php1,683 ▼018.27 ▲0.59435.15 ▼9.66131.09 ▲0.69
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.02170.76 ▲15.13148.29 ▲13.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_tinyc-widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Widget Settings), #2 (Example of widget in the sidebar)
The official readme.txt is a good inspiration

wp-tinycampaign-widget/wp_tinyCampaign_widget.php 92% from 13 tests

The entry point to "WP tinyCampaign Widget" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-tinycampaign-widget.php" instead of "wp_tinyCampaign_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected170 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22049138
PO File18832

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png12.74KB3.95KB▼ 69.01%
screenshot-1.png57.15KB16.02KB▼ 71.97%