10% deshi-news-aggregator

Code Review | Deshi News Aggregator

WordPress plugin Deshi News Aggregator scored10%from 54 tests.

About plugin

  • Plugin page: deshi-news-aggreg...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2019
  • Latest release: Jun 16, 2019
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: shaharia.azam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /939 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Error in wp-content/plugins/deshi-news-aggregator/src/Cron/GetNews.php+31
    Uncaught TypeError: Argument 1 passed to ShahariaAzam\WPPlugin\DeshiNewsAggregator\Cron\GetNews::dbInsert() must be of the type array, null given, called in wp-content/plugins/deshi-news-aggregator/src/Cron/GetNews.php on line 28 and defined in wp-content/plugins/deshi-news-aggregator/src/Cron/GetNews.php:31
    Stack trace:
    #0 wp-content/plugins/deshi-news-aggregator/src/Cron/GetNews.php(28): ShahariaAzam\WPPlugin\DeshiNewsAggregator\Cron\GetNews::dbInsert()
    #1 wp-content/plugins/deshi-news-aggregator/src/DB/Install.php(48): ShahariaAzam\WPPlugin\DeshiNewsAggregator\Cron\GetNews->fetch()
    #2 wp-content/plugins/deshi-news-aggregator/src/DB/Install.php(35): ShahariaAzam\WPPlugin\DeshiNewsAggregator\DB\Install::insertInitialNewsHeadlines()
    #3 wp-includes/class-wp-hook.php(310): ShahariaAzam\WPPlugin\DeshiNewsAggregator\DB\Install::createTables()
    #4 wp-includes/class-wp-hook.php(334): W

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.96ms] Passed 4 tests

Server-side resources used by Deshi News Aggregator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.32 ▼10.95
Dashboard /wp-admin3.31 ▼0.0450.52 ▼13.34
Posts /wp-admin/edit.php3.36 ▲0.0047.89 ▼4.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.81 ▼11.09
Media Library /wp-admin/upload.php3.23 ▲0.0038.35 ▲0.95

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_DESHI_NEWS_AGGREGATOR__news_headlines
New WordPress options
DESHI_NEWS_AGGREGATOR_PLUGIN_db_version
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Deshi News Aggregator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.011.76 ▼0.0842.72 ▼4.28
Dashboard /wp-admin2,206 ▲155.88 ▲1.00106.12 ▼2.0039.21 ▼2.40
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0039.40 ▲3.8735.93 ▲0.08
Add New Post /wp-admin/post-new.php1,514 ▼517.66 ▼5.53666.09 ▼12.8653.97 ▼1.70
Media Library /wp-admin/upload.php1,391 ▲34.13 ▼0.06101.86 ▼0.6348.55 ▲2.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_DESHI_NEWS_AGGREGATOR__news_headlines
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • DESHI_NEWS_AGGREGATOR_PLUGIN_db_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/deshi-news-aggregator/src/Widgets/NAWidgetOne.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: news, bangladeshi, aggregator

deshi-news-aggregator/deshi-news-aggregator.php Passed 13 tests

This is the main PHP file of "Deshi News Aggregator" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
70 characters long description:
Show your WP site visitor all latest news from Bangladeshi news source

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
Good job! No executable or dangerous file extensions detected636 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP19174210617
CSS12010
JSON2009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods47
▷ Static methods612.77%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants8
▷ Global constants8100.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
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
statics/img/deshi_news_aggregator_icon.png0.60KB0.37KB▼ 38.21%