84% post-word-counter-and-thumbnail-checker

Code Review | Post Word Counter and Thumbnail Checker

WordPress plugin Post Word Counter and Thumbnail Checker scored84%from 54 tests.

About plugin

  • Plugin page: post-word-counter...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Oct 19, 2021
  • Latest release: Oct 19, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ratulkhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /268 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.52ms] Passed 4 tests

Analyzing server-side resources used by Post Word Counter and Thumbnail Checker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.42 ▲7.12
Dashboard /wp-admin3.35 ▲0.0453.20 ▼3.70
Posts /wp-admin/edit.php3.40 ▲0.0478.56 ▲24.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.87 ▼15.67
Media Library /wp-admin/upload.php3.28 ▲0.0645.98 ▲10.15

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Post Word Counter and Thumbnail Checker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.014.61 ▲2.7839.55 ▼2.41
Dashboard /wp-admin2,209 ▲184.87 ▼0.00101.54 ▼3.7739.53 ▼5.80
Posts /wp-admin/edit.php2,186 ▲942.13 ▲0.1241.97 ▲1.7137.63 ▼0.93
Add New Post /wp-admin/post-new.php1,519 ▼1523.55 ▲0.28657.35 ▼12.6950.92 ▼4.13
Media Library /wp-admin/upload.php1,382 ▼94.16 ▼0.0697.11 ▼7.8843.94 ▼5.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-word-counter-and-thumbnail-checker/post-word-counter-and-thumbnail-checker.php:18

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (This is the first screen shot) image missing
The official readme.txt is a good inspiration

post-word-counter-and-thumbnail-checker/post-word-counter-and-thumbnail-checker.php 92% from 13 tests

The main PHP script in "Post Word Counter and Thumbnail Checker" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin191 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13311191

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions11
▷ Named functions11100.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
PNG images were not found in this plugin