89% sales-countdown-timer

Code Review | Sales Countdown Timer

WordPress plugin Sales Countdown Timer scored89%from 54 tests.

About plugin

  • Plugin page: sales-countdown-t...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2018
  • Latest release: Sep 5, 2023
  • Number of updates: 49
  • Update frequency: every 38.7 days
  • Top authors: mytrinh (36.73%)kimvt1991 (26.53%)vietmike (18.37%)mrt3vn (14.29%)jackvu99 (6.12%)

Code review

54 tests

User reviews

23 reviews

Install metrics

7,000+ active /99,929 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.15MB] [CPU: ▼10.46ms] Passed 4 tests

Analyzing server-side resources used by Sales Countdown Timer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1635.95 ▼8.11
Dashboard /wp-admin3.47 ▲0.1243.46 ▼22.12
Posts /wp-admin/edit.php3.58 ▲0.2245.92 ▼1.34
Add New Post /wp-admin/post-new.php6.05 ▲0.1690.44 ▼10.25
Media Library /wp-admin/upload.php3.39 ▲0.1633.38 ▼0.82

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 69 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Sales Countdown Timer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.63 ▲0.415.36 ▲0.8540.55 ▼1.53
Dashboard /wp-admin2,215 ▲274.88 ▼0.94106.94 ▼1.7942.63 ▼2.10
Posts /wp-admin/edit.php2,101 ▲122.04 ▲0.0439.68 ▲2.8534.86 ▲1.58
Add New Post /wp-admin/post-new.php1,553 ▲3918.16 ▲0.79610.60 ▼56.6753.89 ▲1.77
Media Library /wp-admin/upload.php1,391 ▲34.18 ▲0.0197.02 ▲3.4643.33 ▼0.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

sales-countdown-timer/sales-countdown-timer.php Passed 13 tests

The principal PHP file in "Sales Countdown Timer" v. 1.1.0 is loaded by WordPress automatically on each request
129 characters long description:
Create a sense of urgency with a countdown to the beginning or end of sales, store launch or other events for higher conversions.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected15,139 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript134111957,037
PHP133952345,988
CSS311885331,074
SVG100565
PO File1187306475

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 203)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity86.18
▷ Minimum class complexity5.00
▷ Maximum class complexity206.00
Average method complexity7.42
▷ Minimum method complexity1.00
▷ Maximum method complexity203.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods146
▷ Static methods32.05%
▷ Public methods13693.15%
▷ Protected methods53.42%
▷ Private methods53.42%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants11
▷ Global constants11100.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
PNG images were not found in this plugin