84% sm-news-ticker

Code Review | SM News Ticker

WordPress plugin SM News Ticker scored 84% from 54 tests.

About plugin

  • Plugin page: sm-news-ticker
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7
  • WordPress version: 6.3.1
  • First release: Sep 8, 2016
  • Latest release: Sep 27, 2016
  • Number of updates: 12
  • Update frequency: every 8.5 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,214 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.81ms] Passed 4 tests

This is a short check of server-side resources used by SM News Ticker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.77 ▲5.48
Dashboard /wp-admin3.32 ▲0.0245.62 ▼0.30
Posts /wp-admin/edit.php3.37 ▲0.0249.91 ▲6.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.16 ▼3.55
Media Library /wp-admin/upload.php3.25 ▲0.0241.11 ▲5.61

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for SM News Ticker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.59 ▼0.815.45 ▲3.6836.46 ▼5.43
Dashboard /wp-admin2,223 ▲354.88 ▼0.98105.72 ▲1.6581.12 ▲41.60
Posts /wp-admin/edit.php2,109 ▲201.98 ▼0.0436.68 ▼1.2235.44 ▲0.84
Add New Post /wp-admin/post-new.php1,683 ▲16922.34 ▲4.86679.57 ▼7.3961.43 ▲2.79
Media Library /wp-admin/upload.php1,405 ▲234.23 ▲0.0197.10 ▼20.1466.17 ▲18.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-news-ticker/sm-news-ticker.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (SM News Ticker settings page.), #2 (SM News Ticker output.)
The official readme.txt is a good inspiration

sm-news-ticker/sm-news-ticker.php Passed 13 tests

The entry point to "SM News Ticker" version 1.0.0 is a PHP file that has certain tags in its header comment area
53 characters long description:
Wordpress plugin to show post as jQuery News Ticker..

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 plugin1,286 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS31617362
JavaScript23270343
SVG100223
HTML1740183
PHP14716175

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png3.99KB3.06KB▼ 23.25%
assets/images/dl-arr.png0.46KB0.42KB▼ 8.55%
assets/images/forkme.png7.74KB4.20KB▼ 45.79%
assets/images/controls.png2.08KB1.38KB▼ 33.36%