84% news-aggregator

Code Review | News Aggregator

WordPress plugin News Aggregator scored84%from 54 tests.

About plugin

  • Plugin page: news-aggregator
  • Plugin version: 0.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 16, 2019
  • Latest release: Apr 12, 2023
  • Number of updates: 12
  • Update frequency: every 113.9 days
  • Top authors: twicetwomedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,839 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▲1.41ms] Passed 4 tests

A check of server-side resources used by News Aggregator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1745.18 ▲6.78
Dashboard /wp-admin3.47 ▲0.1744.43 ▼1.19
Posts /wp-admin/edit.php3.59 ▲0.2344.75 ▼0.14
Add New Post /wp-admin/post-new.php6.06 ▲0.1792.04 ▲5.92
Media Library /wp-admin/upload.php3.40 ▲0.1737.73 ▲1.04
News Aggregator /wp-admin/tools.php?page=News_Agg_Settings3.3832.46

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
News_Agg
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_news_aggregator_widget
widget_recent-posts

Browser metrics Passed 4 tests

News Aggregator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.35 ▼0.947.52 ▲5.8840.22 ▲3.31
Dashboard /wp-admin2,201 ▲205.54 ▼0.1885.55 ▼12.7039.81 ▼2.82
Posts /wp-admin/edit.php2,106 ▲62.01 ▲0.0437.32 ▲0.2334.65 ▼2.38
Add New Post /wp-admin/post-new.php1,531 ▲323.24 ▲0.22652.31 ▼16.7955.98 ▲0.19
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.06101.16 ▼4.1246.11 ▲3.69
News Aggregator /wp-admin/tools.php?page=News_Agg_Settings1,2921.9922.9150.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_news_aggregator_widget
    • can_compress_scripts
    • db_upgraded
    • News_Agg
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/news-aggregator/news-aggregator.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

news-aggregator/news-aggregator.php 92% from 13 tests

The main file in "News Aggregator" v. 0.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected1,081 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1313651882
CSS400199

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods4163.08%
▷ Protected methods2436.92%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants17
▷ Global constants952.94%
▷ Class constants847.06%
▷ Public constants8100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/plnia-logo.png4.87KB1.85KB▼ 61.99%
assets/img/icon-256x256.png11.26KB4.94KB▼ 56.15%