78% get-news-vnexpress-net

Code Review | Get news VNEXPRESS.NET

WordPress plugin Get news VNEXPRESS.NET scored78%from 54 tests.

About plugin

  • Plugin page: get-news-vnexpres...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Jun 17, 2021
  • Number of updates: 12
  • Update frequency: every 118.8 days
  • Top authors: huykiradotnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,336 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼4.26ms] Passed 4 tests

An overview of server-side resources used by Get news VNEXPRESS.NET
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2937.56 ▼5.57
Dashboard /wp-admin3.67 ▲0.3246.44 ▼13.33
Posts /wp-admin/edit.php3.72 ▲0.3647.67 ▲0.32
Add New Post /wp-admin/post-new.php6.19 ▲0.3093.53 ▲2.39
Media Library /wp-admin/upload.php3.53 ▲0.3036.92 ▲1.54

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Get news VNEXPRESS.NET
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.29 ▼1.351.66 ▼0.3035.83 ▼14.09
Dashboard /wp-admin2,222 ▲344.85 ▼1.03111.21 ▼1.8942.23 ▼1.88
Posts /wp-admin/edit.php2,105 ▲131.99 ▲0.0242.12 ▲1.8837.20 ▲5.16
Add New Post /wp-admin/post-new.php1,546 ▲3223.23 ▲5.68644.13 ▼59.3555.61 ▼5.84
Media Library /wp-admin/upload.php1,404 ▲164.24 ▲0.0697.63 ▼17.0041.88 ▼8.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/get-news-vnexpress-net/get_news_vnexpress.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/get-news-vnexpress-net/includes/ajax.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #3 (https://huykira.net/wp-content/uploads/2016/12/chuc-nang-plugin-lay-tin-tu-dong-tuy-chinh.png) image not found
The official readme.txt might help

get-news-vnexpress-net/get_news_vnexpress.php 92% from 13 tests

The main PHP script in "Get news VNEXPRESS.NET" version 1.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("get-news-vnexpress-net.php" instead of "get_news_vnexpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,592 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP43703092,126
SVG100288
CSS245127
JavaScript21551

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin