10% fp-news-scroller

Code Review | FP News Scroller

WordPress plugin FP News Scroller scored10%from 54 tests.

About plugin

  • Plugin page: fp-news-scroller
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2013
  • Latest release: Jul 5, 2013
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: digontobd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,452 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/fp-news-scroller/fp_news_scroller.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; NewsscrollerWidget has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼49.32ms] Passed 4 tests

Server-side resources used by FP News Scroller
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.91 ▼35.41
Dashboard /wp-admin2.16 ▼1.1510.50 ▼40.31
Posts /wp-admin/edit.php2.16 ▼1.206.30 ▼38.49
Add New Post /wp-admin/post-new.php2.16 ▼3.735.90 ▼83.08
Media Library /wp-admin/upload.php2.16 ▼1.075.23 ▼29.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_newsscrollerwidget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for FP News Scroller
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲14813.83 ▼0.467.47 ▲5.6144.86 ▼3.36
Dashboard /wp-admin2,211 ▲205.85 ▲0.97106.26 ▲0.0541.81 ▼7.32
Posts /wp-admin/edit.php2,094 ▲52.06 ▲0.0038.47 ▲5.5033.85 ▲0.24
Add New Post /wp-admin/post-new.php1,527 ▲1323.31 ▲5.82653.78 ▼36.0145.51 ▼9.52
Media Library /wp-admin/upload.php1,393 ▲54.26 ▲0.0196.52 ▼14.8742.73 ▼4.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/fp-news-scroller/fp_news_scroller.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; NewsscrollerWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_newsscrollerwidget

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fp-news-scroller/fp_news_scroller.php:11

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (View Frontend of FP News Scroller Widget View.), #2 (View Backend of FP News Scroller Widget Settings.)
You can look at the official readme.txt

fp-news-scroller/fp_news_scroller.php 85% from 13 tests

"FP News Scroller" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 285 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fp-news-scroller.php" instead of "fp_news_scroller.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin486 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12429255
PHP11510155
CSS15276

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.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%
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.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right.png2.87KB0.82KB▼ 71.56%
screenshot-1.png5.39KB1.83KB▼ 65.98%
images/left.png2.88KB0.82KB▼ 71.60%
screenshot-2.png7.81KB3.37KB▼ 56.79%