10% azan

Code Review | AZAN Plugin

WordPress plugin AZAN Plugin scored10%from 54 tests.

About plugin

  • Plugin page: azan
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Apr 6, 2016
  • Number of updates: 8
  • Update frequency: every 66.8 days
  • Top authors: Goback2 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /7,407 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/azan/index.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_azan has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.87ms] Passed 4 tests

Analyzing server-side resources used by AZAN Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.55 ▼34.12
Dashboard /wp-admin2.15 ▼1.155.58 ▼43.26
Posts /wp-admin/edit.php2.15 ▼1.206.40 ▼39.62
Add New Post /wp-admin/post-new.php2.15 ▼3.735.94 ▼98.47
Media Library /wp-admin/upload.php2.15 ▼1.085.65 ▼32.46
azan /wp-admin/options-general.php?page=azan2.156.49

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for AZAN Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.32 ▼1.084.99 ▲3.1341.90 ▼2.11
Dashboard /wp-admin2,204 ▲135.84 ▲0.7598.92 ▼7.1043.96 ▲0.08
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0337.02 ▼2.7133.35 ▼2.81
Add New Post /wp-admin/post-new.php1,545 ▲2618.06 ▼5.00611.98 ▼60.7353.69 ▼12.96
Media Library /wp-admin/upload.php1,392 ▲14.14 ▼0.0893.50 ▼3.2840.81 ▼4.36
azan /wp-admin/options-general.php?page=azan8152.0222.8633.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/azan/index.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_azan has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_widget_azan
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=azan
    • > Deprecated in wp-content/plugins/azan/index.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_azan has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=azan
    • > Deprecated in wp-content/plugins/azan/index.php+147
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=azan
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in widget_azan is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=azan
    • > Notice in wp-content/plugins/azan/index.php+226
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/azan/azan-js.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=azan
    • > Javascript (severe) in unknown
    http://api.mygeoposition.com/api/geopicker/api.js 0:0 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add a description for screenshot #2 in azan/assets to your readme.txt
The official readme.txt might help

azan/index.php 92% from 13 tests

The main PHP file in "AZAN Plugin" ver. 0.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("azan.php" instead of "index.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
There were no executable files found in this plugin639 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25827594
PO File1356045

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity12.75
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bullet.png1.33KB0.28KB▼ 78.84%