83% mycred-for-wp-postviews

Code Review | myCred for WP-PostViews

WordPress plugin myCred for WP-PostViews scored83%from 54 tests.

About plugin

  • Plugin page: mycred-for-wp-pos...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 22
  • Update frequency: every 62.7 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,646 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.03MB] [CPU: ▼8.69ms] Passed 4 tests

A check of server-side resources used by myCred for WP-PostViews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.97 ▲1.97
Dashboard /wp-admin3.35 ▲0.0045.45 ▼18.94
Posts /wp-admin/edit.php3.46 ▲0.1047.85 ▼4.95
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.75 ▼12.82
Media Library /wp-admin/upload.php3.27 ▲0.0437.02 ▲3.64

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

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

Browser metrics Passed 4 tests

myCred for WP-PostViews: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.14 ▼0.571.79 ▲0.2544.19 ▲4.12
Dashboard /wp-admin2,195 ▲205.63 ▼0.0889.45 ▼14.3640.39 ▲2.87
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0238.52 ▼1.4235.19 ▼5.86
Add New Post /wp-admin/post-new.php1,535 ▲825.25 ▲2.25613.25 ▼46.2761.22 ▲10.78
Media Library /wp-admin/upload.php1,397 ▼64.18 ▼0.0298.21 ▼7.3941.22 ▼1.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-for-wp-postviews/mycred-wp-postviews.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mycred, hits, wp postviews, counter, points

mycred-for-wp-postviews/mycred-wp-postviews.php 77% from 13 tests

"myCred for WP-PostViews" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mycred-for-wp-postviews.php" instead of "mycred-wp-postviews.php")
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WP 4.8")

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 plugin222 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP261116175
PO File1121247

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity6.00
▷ Maximum class complexity8.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods18
▷ Static methods15.56%
▷ Public methods1688.89%
▷ Protected methods15.56%
▷ Private methods15.56%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected