83% toi-news

Code Review | Times of india news headlines

WordPress plugin Times of india news headlines scored 83% from 54 tests.

About plugin

  • Plugin page: toi-news
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2017
  • Latest release: Jun 2, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: iamranit (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.33ms] Passed 4 tests

A check of server-side resources used by Times of india news headlines
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.17 ▼3.20
Dashboard /wp-admin3.31 ▲0.0154.46 ▲7.03
Posts /wp-admin/edit.php3.36 ▲0.0050.30 ▲1.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.46 ▼18.41
Media Library /wp-admin/upload.php3.24 ▲0.0035.82 ▼1.25

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Times of india news headlines
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.76 ▼0.991.77 ▼0.5143.01 ▼5.18
Dashboard /wp-admin2,203 ▲155.89 ▲0.83110.05 ▼1.7846.45 ▲0.96
Posts /wp-admin/edit.php2,089 ▼01.96 ▼0.0240.40 ▼0.0935.41 ▼1.84
Add New Post /wp-admin/post-new.php1,535 ▲2122.97 ▲5.13610.08 ▼67.6255.16 ▲1.52
Media Library /wp-admin/upload.php1,391 ▲64.19 ▲0.04101.38 ▼22.1144.13 ▼3.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/toi-news/news.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

toi-news/news.php 85% from 13 tests

The main PHP file in "Times of india news headlines" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("toi-news.php" instead of "news.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14822

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin