10% wp-audiofanzine-news

Code Review | WP Audiofanzine News

WordPress plugin WP Audiofanzine News scored10%from 54 tests.

About plugin

  • Plugin page: wp-audiofanzine-news
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.8-4.6
  • WordPress version: 6.3.1
  • First release: Jun 13, 2013
  • Latest release: Aug 1, 2016
  • Number of updates: 11
  • Update frequency: every 104.2 days
  • Top authors: Audiofanzine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,599 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-audiofanzine-news/wpafnews.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Wpafnews has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼57.04ms] Passed 4 tests

An overview of server-side resources used by WP Audiofanzine News
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.379.13 ▼32.75
Dashboard /wp-admin2.11 ▼1.236.86 ▼63.34
Posts /wp-admin/edit.php2.11 ▼1.247.01 ▼40.14
Add New Post /wp-admin/post-new.php2.11 ▼3.776.36 ▼91.93
Media Library /wp-admin/upload.php2.11 ▼1.125.67 ▼29.68

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_wpafnews
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Audiofanzine News
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.24 ▼1.072.15 ▲0.5548.36 ▲10.93
Dashboard /wp-admin2,218 ▲125.82 ▲0.9598.93 ▼5.5939.78 ▼4.16
Posts /wp-admin/edit.php2,103 ▲62.04 ▼0.0135.74 ▼1.1135.52 ▼3.32
Add New Post /wp-admin/post-new.php1,545 ▼223.14 ▲0.00649.63 ▼18.9851.70 ▼7.68
Media Library /wp-admin/upload.php1,400 ▲34.23 ▼0.0698.65 ▼3.4444.40 ▼0.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-audiofanzine-news/wpafnews.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Wpafnews has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_wpafnews
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-audiofanzine-news/includes/af_view_widget.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/wp-audiofanzine-news/includes/af_view_widget.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-audiofanzine-news/wpafnews.php:11
    • > PHP Notice
      Undefined variable: news_items in wp-content/plugins/wp-audiofanzine-news/includes/af_view_widget.php on line 6
    • > PHP Notice
      Undefined variable: before_widget in wp-content/plugins/wp-audiofanzine-news/includes/af_view_widget.php on line 1
    • > PHP Notice
      Undefined variable: titlenews in wp-content/plugins/wp-audiofanzine-news/includes/af_view_widget.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-audiofanzine-news/includes/af_view_widget.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-audiofanzine-news/wpafnews.php 92% from 13 tests

The main PHP script in "WP Audiofanzine News" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-audiofanzine-news.php" instead of "wpafnews.php")

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
Everything looks great! No dangerous files found in this plugin533 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP34794324
JavaScript1311117
PO File4161692

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.00
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.31MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.80KB10.23KB▼ 69.74%
screenshot-2.png38.26KB12.04KB▼ 68.53%
screenshot-3.png25.30KB6.33KB▼ 74.96%
screenshot-4.png223.62KB93.48KB▼ 58.20%