84% nice-latest-news-ticker

Code Review | Nice Latest News Ticker

WordPress plugin Nice Latest News Ticker scored84%from 54 tests.

About plugin

  • Plugin page: nice-latest-news-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2019
  • Latest release: Jan 11, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: nriddhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /962 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
Installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲8.77ms] Passed 4 tests

An overview of server-side resources used by Nice Latest News Ticker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6249.61 ▲10.12
Dashboard /wp-admin3.99 ▲0.6958.82 ▲8.04
Posts /wp-admin/edit.php4.02 ▲0.6659.25 ▲9.53
Add New Post /wp-admin/post-new.php6.72 ▲0.83102.34 ▲14.16
Media Library /wp-admin/upload.php3.92 ▲0.6946.71 ▲7.38
Add New Ticker /wp-admin/post-new.php?post_type=nice_ltn_ticker4.2853.36
All News Ticker /wp-admin/edit.php?post_type=nice_ltn_ticker3.9648.66

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 121 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Nice Latest News Ticker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,015 ▲28013.74 ▼0.486.54 ▲4.6451.22 ▲5.46
Dashboard /wp-admin2,303 ▲1155.13 ▲0.09120.91 ▲19.6449.03 ▲6.98
Posts /wp-admin/edit.php2,186 ▲972.27 ▲0.2739.00 ▲2.4139.74 ▲8.69
Add New Post /wp-admin/post-new.php1,550 ▲2817.88 ▼3.08744.48 ▼196.1767.68 ▲7.19
Media Library /wp-admin/upload.php1,513 ▲1254.32 ▲0.13126.18 ▲8.6953.45 ▲10.09
Add New Ticker /wp-admin/post-new.php?post_type=nice_ltn_ticker2,1003.35101.1560.83
All News Ticker /wp-admin/edit.php?post_type=nice_ltn_ticker1,1612.2040.6937.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nice-latest-news-ticker/plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/nice-latest-news-ticker/library/metabox/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: The official readme.txt is a good inspiration

nice-latest-news-ticker/plugin.php 92% from 13 tests

The primary PHP file in "Nice Latest News Ticker" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("nice-latest-news-ticker.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin14,528 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
PHP602,1345,7756,759
CSS141,2051,1514,876
JavaScript83545001,514
Sass16300251,379

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity18.13
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes68
▷ Abstract classes811.76%
▷ Concrete classes6088.24%
▷ Final classes00.00%
Methods525
▷ Static methods8716.57%
▷ Public methods43482.67%
▷ Protected methods8816.76%
▷ Private methods30.57%
Functions32
▷ Named functions3093.75%
▷ Anonymous functions26.25%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/metabox/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
library/metabox/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
library/metabox/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
library/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
library/metabox/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%