83% mycred-square

Code Review | myCred Square

WordPress plugin myCred Square scored83%from 54 tests.

About plugin

  • Plugin page: mycred-square
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 26
  • Update frequency: every 43.0 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,560 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.54ms] Passed 4 tests

Analyzing server-side resources used by myCred Square
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.81 ▼1.91
Dashboard /wp-admin3.31 ▲0.0044.97 ▼14.92
Posts /wp-admin/edit.php3.36 ▲0.0046.80 ▲0.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.44 ▲2.60
Media Library /wp-admin/upload.php3.23 ▲0.0035.33 ▲1.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

myCred Square: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.21 ▲0.071.81 ▼0.2338.36 ▼5.60
Dashboard /wp-admin2,195 ▲215.61 ▲0.0495.82 ▲3.0241.62 ▲2.39
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0540.48 ▲3.5937.08 ▼0.09
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.06647.71 ▼91.6960.65 ▼1.87
Media Library /wp-admin/upload.php1,394 ▼34.13 ▲0.03100.58 ▼10.3042.31 ▼2.61

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/mycred-square/mycred-square.php:87

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #2, #3, #4, #5, #6, #7, #8, #9 in mycred-square/assets to your readme.txt
You can take inspiration from this readme.txt

mycred-square/mycred-square.php 77% from 13 tests

The entry point to "myCred Square" version 1.0.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/lang")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.4" instead of "4.8")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,071 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS227781,229
PHP3226114677
JavaScript12858165

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity59.50
▷ Minimum class complexity24.00
▷ Maximum class complexity95.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods31
▷ Static methods412.90%
▷ Public methods2993.55%
▷ Protected methods00.00%
▷ Private methods26.45%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png2.29KB0.60KB▼ 73.61%