10% word-freshener

Code Review | Word Freshener

WordPress plugin Word Freshener scored10%from 54 tests.

About plugin

  • Plugin page: word-freshener
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2018
  • Latest release: May 23, 2020
  • Number of updates: 10
  • Update frequency: every 67.9 days
  • Top authors: sourov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,190 total downloads

Benchmarks

Plugin footprint 23% 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
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/word-freshener/word-freshener.php+45
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.89MB] [CPU: ▼53.54ms] Passed 4 tests

Analyzing server-side resources used by Word Freshener
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.72 ▼29.73
Dashboard /wp-admin2.12 ▼1.197.48 ▼39.81
Posts /wp-admin/edit.php2.12 ▼1.246.92 ▼46.19
Add New Post /wp-admin/post-new.php2.12 ▼3.776.29 ▼96.76
Media Library /wp-admin/upload.php2.12 ▼1.116.10 ▼31.41
Add Words /wp-admin/admin.php?page=wfps_add2.126.32
Word Freshener /wp-admin/admin.php?page=wfps-main2.127.45
Settings /wp-admin/admin.php?page=wfps_settings2.126.62

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_wfp
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Word Freshener
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.62 ▼0.751.76 ▲0.0144.29 ▲5.96
Dashboard /wp-admin2,235 ▲535.84 ▲0.96100.15 ▼3.5379.64 ▲35.05
Posts /wp-admin/edit.php2,118 ▲262.02 ▼0.1537.24 ▼5.8534.97 ▲0.23
Add New Post /wp-admin/post-new.php1,548 ▲1523.25 ▼0.02708.33 ▲8.0052.85 ▼2.16
Media Library /wp-admin/upload.php1,414 ▲264.25 ▲0.12110.76 ▼3.2645.14 ▼3.02
Add Words /wp-admin/admin.php?page=wfps_add8322.0524.5124.74
Word Freshener /wp-admin/admin.php?page=wfps-main2,8571.6927.7838.77
Settings /wp-admin/admin.php?page=wfps_settings8182.0226.2026.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/word-freshener/word-freshener.php+45
    Trying to access array offset on value of type bool
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wfp
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wfps_settings
    • > Notice in wp-content/plugins/word-freshener/dashboard.php+204
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/word-freshener/word-freshener.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

word-freshener/word-freshener.php Passed 13 tests

The entry point to "Word Freshener" version 1.3 is a PHP file that has certain tags in its header comment area
129 characters long description:
A simple plugin to filter commonly used unwanted and bad words from anywhere in your site. Replace words with full customization.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin294 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34854294

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions8
▷ Named functions8100.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
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
image/wf-logo.png2.23KB1.18KB▼ 46.97%