68% codeins-post-voting

Code Review | Codeins Post Voting

WordPress plugin Codeins Post Voting scored68%from 54 tests.

About plugin

  • Plugin page: codeins-post-voting
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 26, 2015
  • Latest release: Jun 26, 2015
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: kapilsharma12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /889 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.51ms] Passed 4 tests

Analyzing server-side resources used by Codeins Post Voting
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1849.93 ▲6.42
Dashboard /wp-admin3.47 ▲0.1351.01 ▼13.29
Posts /wp-admin/edit.php3.59 ▲0.2350.97 ▼5.92
Add New Post /wp-admin/post-new.php6.05 ▲0.1799.17 ▼0.99
Media Library /wp-admin/upload.php3.40 ▲0.1737.98 ▲2.18
Post stats /wp-admin/admin.php?page=cm-post-stats3.4234.96
User Management /wp-admin/admin.php?page=cm-user-management3.3839.73
Generl Settings /wp-admin/admin.php?page=codeinspostrating3.4436.31

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, 29 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Codeins Post Voting
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲20513.63 ▼0.599.34 ▲7.4649.30 ▲1.27
Dashboard /wp-admin2,237 ▲525.87 ▲0.01109.00 ▲1.5642.27 ▼0.19
Posts /wp-admin/edit.php2,117 ▲252.05 ▲0.0139.57 ▼2.2435.06 ▼1.69
Add New Post /wp-admin/post-new.php1,559 ▲1723.34 ▲5.19652.01 ▲34.3757.30 ▼0.77
Media Library /wp-admin/upload.php1,422 ▲344.30 ▲0.1495.89 ▼3.3443.84 ▼2.44
Post stats /wp-admin/admin.php?page=cm-post-stats9362.3035.2738.53
User Management /wp-admin/admin.php?page=cm-user-management9112.1036.3129.28
Generl Settings /wp-admin/admin.php?page=codeinspostrating1,7172.7955.4427.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Zombie tables were found after uninstall: 1 table
    • wp_codeins_post_voting
  • The uninstall procedure has failed, leaving 29 options in the database
    • comd_widget_post_limit
    • widget_recent-comments
    • comd_bar_width_type
    • comd_user_vote_vlaue
    • comd_auto_insert_to_pages
    • comd_bar_border_type
    • comd_bar_vertical_align
    • comd_backgroud_color
    • comd_bar_cold_limit
    • comdal_bar_border_color
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/codeins-post-voting/admin/user-manage.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/codeins-post-voting/admin/options-setting.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/codeins-post-voting/admin/post-stats.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codeins-post-voting/codeins-post-voting.php:14
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/codeins-post-voting/admin/user-manage.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/codeins-post-voting/include/hot-cold-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/codeins-post-voting/admin/post-stats.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=cm-post-stats
    • > Network (severe)
    wp-content/plugins/codeins-post-voting/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)


Plugin configuration 93% 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 require attention:
  • Donate link: Invalid URI ("www.codeins.org/donate")
You can look at the official readme.txt

codeins-post-voting/codeins-post-voting.php 92% from 13 tests

This is the main PHP file of "Codeins Post Voting" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 245 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,420 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions28100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/cold.png1.40KB1.06KB▼ 24.28%