84% pbp-newsticker

Code Review | PBP Newsticker

WordPress plugin PBP Newsticker scored84%from 54 tests.

About plugin

  • Plugin page: pbp-newsticker
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2014
  • Latest release: Apr 25, 2015
  • Number of updates: 12
  • Update frequency: every 18.5 days
  • Top authors: projoktibangla (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,330 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼4.01ms] Passed 4 tests

A check of server-side resources used by PBP Newsticker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4540.70 ▼10.28
Dashboard /wp-admin3.75 ▲0.4546.58 ▼1.66
Posts /wp-admin/edit.php3.80 ▲0.4450.59 ▲0.46
Add New Post /wp-admin/post-new.php6.27 ▲0.3895.68 ▼4.57
Media Library /wp-admin/upload.php3.61 ▲0.3838.83 ▲7.72
PBP Newsticker /wp-admin/options-general.php?page=pbpNewsticker3.5832.42

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

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

Browser metrics Passed 4 tests

PBP Newsticker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13913.66 ▼0.694.93 ▲3.2843.68 ▼1.25
Dashboard /wp-admin2,210 ▲224.86 ▼1.05110.82 ▲9.7239.14 ▼5.04
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0239.13 ▼2.7136.41 ▼1.26
Add New Post /wp-admin/post-new.php1,533 ▲1918.30 ▲0.54607.20 ▼51.2552.90 ▲8.82
Media Library /wp-admin/upload.php1,395 ▲164.23 ▲0.0896.52 ▼5.1643.23 ▲0.75
PBP Newsticker /wp-admin/options-general.php?page=pbpNewsticker8572.0338.2633.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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 | 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
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Data_Source' not found in wp-content/plugins/pbp-newsticker/data_sources/free_form.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Rss' not found in wp-content/plugins/pbp-newsticker/data_sources/facebook.class.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/pbp-newsticker/pbp-newsticker.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pbp-newsticker/data_source.class.php:549
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Recent_Posts' not found in wp-content/plugins/pbp-newsticker/data_sources/recent_custom_post_types.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Data_Source' not found in wp-content/plugins/pbp-newsticker/data_sources/twitter.class.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Data_Source' not found in wp-content/plugins/pbp-newsticker/data_sources/recent_comments.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Data_Source' not found in wp-content/plugins/pbp-newsticker/data_sources/recent_posts.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'pbpNewsticker_Data_Source' not found in wp-content/plugins/pbp-newsticker/data_sources/rss.class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
1 plugin tags: newsticker

pbp-newsticker/pbp-newsticker.php Passed 13 tests

The principal PHP file in "PBP Newsticker" v. 1.3.2 is loaded by WordPress automatically on each request
90 characters long description:
Create as many news tickers as you want and display them using shortcodes, widgets or PHP.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected5,388 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54263422,393
PHP104128511,820
CSS8101128833
PO File1151159342

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity26.70
▷ Minimum class complexity2.00
▷ Maximum class complexity97.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods133
▷ Static methods1410.53%
▷ Public methods12896.24%
▷ Protected methods43.01%
▷ Private methods10.75%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/pbpNewsticker/skins/img/resume.png0.25KB0.13KB▼ 47.69%
media/ui-lightness/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
media/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
media/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png0.10KB0.11KB0.00%
media/ui-lightness/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%