78% blim-post-suggestion-and-vote

Code Review | Blim Post Suggestion and Vote

WordPress plugin Blim Post Suggestion and Vote scored78%from 54 tests.

About plugin

  • Plugin page: blim-post-suggest...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 27, 2021
  • Latest release: Jan 28, 2023
  • Number of updates: 14
  • Update frequency: every 50.1 days
  • Top authors: blheson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,739 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.09MB] [CPU: ▼3.42ms] Passed 4 tests

An overview of server-side resources used by Blim Post Suggestion and Vote
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.00 ▲5.17
Dashboard /wp-admin3.39 ▲0.0945.54 ▼6.97
Posts /wp-admin/edit.php3.50 ▲0.1543.78 ▼3.34
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.71 ▼6.61
Media Library /wp-admin/upload.php3.31 ▲0.0839.54 ▲3.25
Blim Post Suggestion and Vote /wp-admin/options-general.php?page=blim_option_settings3.2830.02

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Blim Post Suggestion and Vote
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.34 ▲0.222.01 ▲0.3838.51 ▲0.57
Dashboard /wp-admin2,206 ▲315.58 ▼0.0182.95 ▼21.7836.45 ▼2.55
Posts /wp-admin/edit.php2,108 ▲82.01 ▲0.0736.77 ▼4.6532.28 ▼6.51
Add New Post /wp-admin/post-new.php1,550 ▲2217.85 ▼5.13607.44 ▼15.3769.95 ▲1.17
Media Library /wp-admin/upload.php1,414 ▲144.19 ▼0.0499.75 ▲1.9346.84 ▲1.20
Blim Post Suggestion and Vote /wp-admin/options-general.php?page=blim_option_settings8332.0025.5726.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/blim-post-suggestion-and-vote/blim.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant BLIM_FILE - assumed 'BLIM_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/blim-post-suggestion-and-vote/constant.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/blim-post-suggestion-and-vote/constant.php:19
    • > PHP Warning
      Use of undefined constant BLIM_FILE - assumed 'BLIM_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/blim-post-suggestion-and-vote/constant.php on line 16
    • > PHP Warning
      Use of undefined constant BLIM_FILE - assumed 'BLIM_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/blim-post-suggestion-and-vote/constant.php on line 13
    • > PHP Warning
      Use of undefined constant BLIM_FILE - assumed 'BLIM_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/blim-post-suggestion-and-vote/constant.php on line 16
    • > PHP Warning
      Use of undefined constant BLIM_FILE - assumed 'BLIM_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/blim-post-suggestion-and-vote/loader.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/blim-post-suggestion-and-vote/constant.php:19

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: posts, vote, feedback, voting, post suggestion

blim-post-suggestion-and-vote/blim.php 77% from 13 tests

The primary PHP file in "Blim Post Suggestion and Vote" version 1.0.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("blim-post-suggestion-and-vote.php" instead of "blim.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 226 characters long)

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 plugin621 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13101182391
CSS161150
JavaScript110080

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.23
Average class complexity3.89
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1973.08%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants27100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/thumbs-up.png0.49KB0.32KB▼ 34.60%
assets/img/thumbs-down.png0.49KB0.33KB▼ 31.74%