83% wp-news-magazine

Code Review | WP News - WordPress News / Magazine Plugin

WordPress plugin WP News - WordPress News / Magazine Plugin scored83%from 54 tests.

About plugin

  • Plugin page: wp-news-magazine
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 11, 2019
  • Latest release: Aug 3, 2023
  • Number of updates: 26
  • Update frequency: every 64.0 days
  • Top authors: htplugins (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /15,437 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▲2.94ms] 75% from 4 tests

Analyzing server-side resources used by WP News - WordPress News / Magazine Plugin
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,345.17ms on /wp-admin/admin.php?page=wpnews-recommendations)
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.17 ▲2.79
Dashboard /wp-admin3.50 ▲0.2052.99 ▲6.31
Posts /wp-admin/edit.php3.55 ▲0.2051.35 ▲3.31
Add New Post /wp-admin/post-new.php5.99 ▲0.1197.60 ▲1.62
Media Library /wp-admin/upload.php3.34 ▲0.1137.48 ▲4.02
Recommendations /wp-admin/admin.php?page=wpnews-recommendations7.661,345.17
WP News /wp-admin/admin.php?page=htmagazine3.3338.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 80 new files
Database: no new tables, 13 new options
New WordPress options
db_upgraded
widget_htmagazine_single_banner
htinstagram_general_tabs
widget_recent-posts
can_compress_scripts
widget_htmagazine_newsletter_widget
widget_htmagazine_recent-widget
widget_recent-comments
widget_htmagazine_description_widget
widget_htmagazine_video_popup
...

Browser metrics Passed 4 tests

WP News - WordPress News / Magazine Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲25615.24 ▲0.661.80 ▼0.0944.21 ▼2.16
Dashboard /wp-admin2,382 ▲1916.63 ▲1.51130.73 ▲21.85100.94 ▲59.61
Posts /wp-admin/edit.php2,310 ▲2213.57 ▲1.6054.38 ▲14.6472.31 ▲37.09
Add New Post /wp-admin/post-new.php1,719 ▲17723.03 ▲4.92595.18 ▼6.1631.65 ▼19.99
Media Library /wp-admin/upload.php1,447 ▲654.32 ▲0.1182.13 ▼17.1675.10 ▲33.17
Recommendations /wp-admin/admin.php?page=wpnews-recommendations3,0923.5247.5897.33
WP News /wp-admin/admin.php?page=htmagazine1,0573.3249.2460.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_htmagazine_recent-widget
    • db_upgraded
    • widget_recent-posts
    • htinstagram_general_tabs
    • can_compress_scripts
    • widget_htmagazine_video_popup
    • widget_htmagazine_single_banner
    • widget_htmagazine_author_about_widget
    • widget_htmagazine_newsletter_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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Icons_Manager' not found in wp-content/plugins/wp-news-magazine/includes/class.htmagazine-icon-manager.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-news-magazine/includes/widgets/author-info.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-news-magazine/admin/include/admin_notice.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-news-magazine/includes/widgets/newsletter.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-news-magazine/includes/widgets/recent-post.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-news-magazine/includes/helpers_function.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-news-magazine/includes/widgets/video-popup.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-news-magazine/includes/widgets/company-info-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-news-magazine/includes/widgets/single-banner.php:10

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 96% from 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
5 plugin tags: wordpress news, blog, magazine, news, elementor

wp-news-magazine/wp-news-magazine.php 92% from 13 tests

"WP News - WordPress News / Magazine Plugin" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and 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 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin16,259 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,81658611,951
SVG1002,671
CSS89531541,154
JavaScript11106155483

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity21.82
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods182
▷ Static methods42.20%
▷ Public methods14881.32%
▷ Protected methods3217.58%
▷ Private methods21.10%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) admin/assets/images/extensions/was-this-helpful.png1.21KB0.00KB▼ 100.00%
(invalid) admin/assets/images/extensions/ht-google-place-review.png2.64KB0.00KB▼ 100.00%
admin/assets/images/extensions/hashbar-pro.png3.15KB3.30KB0.00%
admin/assets/images/extensions/just-tables-pro.png1.02KB1.05KB0.00%
(invalid) admin/assets/images/extensions/cf7-extensions-pro.png8.57KB0.00KB▼ 100.00%