84% article-difficulty-level

Code Review | Article Difficulty Level

WordPress plugin Article Difficulty Level scored84%from 54 tests.

About plugin

  • Plugin page: article-difficult...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2013
  • Latest release: Nov 12, 2015
  • Number of updates: 122
  • Update frequency: every 6.3 days
  • Top authors: vinoth06 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /2,761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.46ms] Passed 4 tests

Server-side resources used by Article Difficulty Level
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.59 ▲0.52
Dashboard /wp-admin3.37 ▲0.0350.62 ▼8.39
Posts /wp-admin/edit.php3.42 ▲0.0750.80 ▼1.45
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.93 ▼8.52
Media Library /wp-admin/upload.php3.30 ▲0.0738.35 ▲1.10
Article Difficulty /wp-admin/options-general.php?page=article-difficulty-level/bc-article-difficulty.php3.2633.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 213 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Article Difficulty Level
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.67 ▼0.921.96 ▲0.0940.57 ▼2.30
Dashboard /wp-admin2,234 ▲345.88 ▲1.0097.43 ▼9.7638.80 ▼2.21
Posts /wp-admin/edit.php2,123 ▲202.01 ▼0.0438.79 ▼2.0334.75 ▼1.46
Add New Post /wp-admin/post-new.php6,273 ▲4,74226.01 ▲2.79902.93 ▲224.0357.06 ▲6.65
Media Library /wp-admin/upload.php1,413 ▲104.21 ▼0.00100.29 ▼18.4747.10 ▼0.69
Article Difficulty /wp-admin/options-general.php?page=article-difficulty-level/bc-article-difficulty.php9691.7628.1934.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/article-difficulty-level/tags/1.1/bc-article-difficulty.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/article-difficulty-level/tags/1.1.2/bc-article-difficulty.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/article-difficulty-level/tags/1.1.2/bc-article-difficulty.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/article-difficulty-level/tags/1.1/bc-article-difficulty.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Option setting page.), #2 (Post Area Selection.), #3 (Post Strength mode selection), #4 (Rating below the post), #5 (Rating above the post)
You can take inspiration from this readme.txt

article-difficulty-level/article-difficulty-level.php Passed 13 tests

The main PHP file in "Article Difficulty Level" ver. 3.1 adds more information about the plugin and also serves as the entry point for this plugin
119 characters long description:
Through this plugin, user can able to select the articles difficulty level in admin dash board post area for each post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin4,664 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP217459162,605
SVG2001,205
JavaScript113837822
CSS35632

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.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions119
▷ Named functions119100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
134 PNG files occupy 2.62MB with 1.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tags/3.0/screenshot-5.png30.65KB10.71KB▼ 65.06%
screenshot-2.png39.88KB16.12KB▼ 59.59%
tags/2.2.2/js/hv.png2.80KB7.32KB0.00%
tags/1.1.4/screenshot-3.png27.04KB11.46KB▼ 57.61%
tags/1.1.3/screenshot-2.png72.89KB32.08KB▼ 55.99%