10% wajeez-otd

Code Review | Wajeez OTD

WordPress plugin Wajeez OTD scored10%from 54 tests.

About plugin

  • Plugin page: wajeez-otd
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: May 28, 2013
  • Latest release: Dec 28, 2014
  • Number of updates: 13
  • Update frequency: every 44.5 days
  • Top authors: wajeez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,160 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wajeez-otd/wajeezotd.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; WajeezOTD has a deprecated constructor

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

Analyzing server-side resources used by Wajeez OTD
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.06 ▼36.46
Dashboard /wp-admin2.16 ▼1.146.36 ▼48.34
Posts /wp-admin/edit.php2.16 ▼1.205.60 ▼46.76
Add New Post /wp-admin/post-new.php2.16 ▼3.735.94 ▼92.55
Media Library /wp-admin/upload.php2.16 ▼1.075.48 ▼30.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
wajeez-message
theysaidso_admin_options
widget_wajeezotd
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Wajeez OTD
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13413.85 ▼0.437.91 ▲6.1241.03 ▼3.91
Dashboard /wp-admin2,213 ▲365.60 ▲0.0398.36 ▲6.7541.85 ▼2.39
Posts /wp-admin/edit.php2,121 ▲211.99 ▲0.0440.41 ▲1.0936.59 ▲3.50
Add New Post /wp-admin/post-new.php1,541 ▲1323.21 ▲0.13627.52 ▼43.6650.98 ▼8.98
Media Library /wp-admin/upload.php1,418 ▲184.22 ▲0.05107.04 ▲4.9348.56 ▲4.03
Wajeez OTD Settings /wp-admin/plugin.php?page=wajeez-settings260.420.0914.91

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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wajeez-otd/wajeezotd.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; WajeezOTD has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_wajeezotd
    • wajeez-message
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wajeez-otd/wajeezotd.php:38

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/plugin.php?page=wajeez-settings
    • > Network (severe)
    wp-admin/plugin.php?page=wajeez-settings - Failed to load resource: the server responded with a status of 404 (Not Found)

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 to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (FrontEnd), #2 (Settings page)
Please take inspiration from this readme.txt

wajeez-otd/wajeezotd.php 92% from 13 tests

The entry point to "Wajeez OTD" version 1.1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wajeez-otd.php" instead of "wajeezotd.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected407 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP14041246
PO File24646130
CSS21231

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.80KB3.28KB▼ 57.87%
screenshot-2.png18.27KB7.61KB▼ 58.35%