84% episode-vii-countdown-widget

Code Review | Episode VII Countdown Widget

WordPress plugin Episode VII Countdown Widget scored84%from 54 tests.

About plugin

  • Plugin page: episode-vii-count...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2014
  • Latest release: Dec 5, 2014
  • Number of updates: 9
  • Update frequency: every 1.2 days
  • Top authors: fassan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,379 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.64ms] Passed 4 tests

This is a short check of server-side resources used by Episode VII Countdown Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.93 ▼1.41
Dashboard /wp-admin3.37 ▲0.0756.91 ▲3.81
Posts /wp-admin/edit.php3.42 ▲0.0747.52 ▼2.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0788.78 ▲2.56
Media Library /wp-admin/upload.php3.29 ▲0.0737.16 ▲3.87

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_wb_countdown_widget
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Episode VII Countdown Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.82 ▼0.538.33 ▲6.2344.29 ▼4.97
Dashboard /wp-admin2,195 ▲185.57 ▼0.0488.97 ▼7.5344.33 ▲2.74
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0735.71 ▼1.9332.14 ▼1.32
Add New Post /wp-admin/post-new.php1,527 ▲121.01 ▼2.23668.99 ▼59.0662.81 ▲11.51
Media Library /wp-admin/upload.php1,397 ▼64.23 ▼0.06113.14 ▲19.3847.57 ▲3.81

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_wb_countdown_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 15
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/episode-vii-countdown-widget/episode7-countdown-widget.php:30
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/episode-vii-countdown-widget/layout.php:16
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 15
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 15
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/episode-vii-countdown-widget/layout.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: countdown, episodevii, star wars, episode vii, timer...

episode-vii-countdown-widget/episode7-countdown-widget.php 85% from 13 tests

The main PHP file in "Episode VII Countdown Widget" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("episode-vii-countdown-widget.php" instead of "episode7-countdown-widget.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin897 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS18221326
PHP24878321
JavaScript238202250

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity66.00
▷ Minimum class complexity66.00
▷ Maximum class complexity66.00
Average method complexity17.25
▷ Minimum method complexity1.00
▷ Maximum method complexity53.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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin