78% latest-news-marquee

Code Review | Latest News Marquee

WordPress plugin Latest News Marquee scored78%from 54 tests.

About plugin

  • Plugin page: latest-news-marquee
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2015
  • Latest release: Mar 14, 2015
  • Number of updates: 5
  • Update frequency: every 3.4 days
  • Top authors: hizbul (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /5,244 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Latest News Marquee
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.64 ▼2.03
Dashboard /wp-admin3.33 ▲0.0251.20 ▲0.01
Posts /wp-admin/edit.php3.44 ▲0.0850.79 ▼7.19
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.86 ▼22.81
Media Library /wp-admin/upload.php3.25 ▲0.0241.97 ▲7.93

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Latest News Marquee
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12813.52 ▼0.888.14 ▲6.3737.72 ▼2.61
Dashboard /wp-admin2,213 ▲335.67 ▼0.1481.80 ▼12.5074.88 ▲30.66
Posts /wp-admin/edit.php2,112 ▲121.98 ▼0.0139.16 ▼1.4336.85 ▼1.01
Add New Post /wp-admin/post-new.php1,692 ▲16321.76 ▼1.29666.86 ▼21.1852.20 ▲1.19
Media Library /wp-admin/upload.php1,418 ▲154.13 ▼0.07102.03 ▲8.1759.30 ▲12.59

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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/latest-news-marquee/latest-news-marquee.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(LNM_PLUGIN_PATH/inc/libs/simple_html_dom.php): failed to open stream: No such file or directory in wp-content/plugins/latest-news-marquee/view/lnm-front.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'LNM_PLUGIN_PATH/inc/libs/simple_html_dom.php' (include_path='.:/usr/share/php') in wp-content/plugins/latest-news-marquee/view/lnm-front.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-news-marquee/admin/lnm-admin.php:6
    • > PHP Warning
      Use of undefined constant LNM_PLUGIN_PATH - assumed 'LNM_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/latest-news-marquee/view/lnm-front.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (lnm-01.png show the plugin setting menu), #2 (lnm-03.png describe, how to customise look of latest news marquee and add label for latest news.), #3 (lnm-04.png show, how to write shortcode), #4 (lnm-05.png show the result of shortcode in blog/website.)
The official readme.txt is a good inspiration

latest-news-marquee/latest-news-marquee.php 92% from 13 tests

Analyzing the main PHP file in "Latest News Marquee" version 1.0
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)

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,517 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP62422701,490
JavaScript22516
CSS11011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity69.00
▷ Minimum class complexity2.00
▷ Maximum class complexity197.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods105
▷ Static methods32.86%
▷ Public methods8580.95%
▷ Protected methods1615.24%
▷ Private methods43.81%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants25100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/lnm.png0.61KB0.42KB▼ 31.21%