84% casepress-upvote

Code Review | CasePress UpVote

WordPress plugin CasePress UpVote scored84%from 54 tests.

About plugin

  • Plugin page: casepress-upvote
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2013
  • Latest release: Oct 31, 2013
  • Number of updates: 15
  • Update frequency: every 7.7 days
  • Top authors: casepress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,765 total downloads

Benchmarks

Plugin footprint 83% 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.14MB] [CPU: ▲3.24ms] Passed 4 tests

An overview of server-side resources used by CasePress UpVote
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.79 ▲4.64
Dashboard /wp-admin3.44 ▲0.1351.02 ▲2.69
Posts /wp-admin/edit.php3.55 ▲0.1954.10 ▲4.71
Add New Post /wp-admin/post-new.php6.04 ▲0.15104.84 ▲15.76
Media Library /wp-admin/upload.php3.36 ▲0.1339.56 ▲0.90
Upvote Settings /wp-admin/options-general.php?page=casepress-upvote3.3330.67

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 14 new options
New WordPress options
theysaidso_admin_options
casepress-upvote_buttons-style
casepress-upvote_position-comments
casepress-upvote_like-posts
widget_theysaidso_widget
casepress-upvote_position-posts
widget_recent-comments
db_upgraded
casepress-upvote_like-comments
casepress-upvote_dislikes
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for CasePress UpVote
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.47 ▼1.179.09 ▲7.3647.60 ▲2.88
Dashboard /wp-admin2,198 ▲215.60 ▼0.0485.24 ▼2.9339.96 ▼5.74
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0339.53 ▲3.0033.56 ▼2.73
Add New Post /wp-admin/post-new.php1,608 ▲8223.60 ▲0.42638.75 ▲23.9251.89 ▼6.26
Media Library /wp-admin/upload.php1,406 ▲34.29 ▲0.1199.65 ▼4.8743.57 ▼2.64
Upvote Settings /wp-admin/options-general.php?page=casepress-upvote1,0451.6523.4628.04

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 did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • casepress-upvote_noauth-msg
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× 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/casepress-upvote/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/casepress-upvote/settings.php:6

User-side errors Passed 1 test

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

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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png - shows plugin settings.), #2 (screenshot-2.png - shows one of buttons positions.), #3 (screenshot-3.png - shows one of buttons positions.), #4 (screenshot-4.png - shows one of buttons positions.), #5 (screenshot-5.png - shows one of buttons positions.)
The official readme.txt is a good inspiration

casepress-upvote/casepress-upvote.php Passed 13 tests

The principal PHP file in "CasePress UpVote" v. 1.0.0 is loaded by WordPress automatically on each request
52 characters long description:
CasePress UpVote - posts and comments rating system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,014 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP38117696
CSS311158
JavaScript213080
PO File1283880

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity63.50
▷ Minimum class complexity4.00
▷ Maximum class complexity123.00
Average method complexity6.95
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.79KB11.26KB▼ 60.88%
screenshot-5.png13.52KB6.23KB▼ 53.92%
screenshot-4.png13.54KB6.21KB▼ 54.15%
styles/buttons/stackoverflow/sprites-stackoverflow.png16.04KB7.92KB▼ 50.60%
screenshot-3.png12.82KB5.80KB▼ 54.74%