84% upvotr

Code Review | Upvotr

WordPress plugin Upvotr scored84%from 54 tests.

About plugin

  • Plugin page: upvotr
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 28, 2016
  • Latest release: Feb 29, 2016
  • Number of updates: 9
  • Update frequency: every 3.0 days
  • Top authors: lgladdy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,089 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.99ms] Passed 4 tests

An overview of server-side resources used by Upvotr
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.02 ▼1.38
Dashboard /wp-admin3.31 ▼0.0446.95 ▼8.39
Posts /wp-admin/edit.php3.36 ▲0.0043.25 ▼0.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.29 ▼19.62
Media Library /wp-admin/upload.php3.23 ▲0.0034.22 ▼6.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Upvotr
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.58 ▲0.221.80 ▲0.3343.48 ▲6.38
Dashboard /wp-admin2,195 ▲145.57 ▼0.1486.05 ▼34.8239.14 ▼10.64
Posts /wp-admin/edit.php2,097 ▼01.99 ▼0.0532.87 ▼3.0733.40 ▼3.09
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.02655.70 ▼8.4058.65 ▲6.24
Media Library /wp-admin/upload.php1,403 ▲64.26 ▼0.0396.10 ▼9.9343.78 ▼0.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function upvotr\\add_action() in wp-content/plugins/upvotr/upvotr/upvotr.class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: likes, voting, upvote, downvote

upvotr/upvotr.php Passed 13 tests

"Upvotr" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
49 characters long description:
A plugin to enable user upvoting of post objects.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin186 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21913158
Markdown19028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin