84% meritocracy

Code Review | Meritocracy - Near-Powered Gamification Plugin for WordPress

WordPress plugin Meritocracy - Near-Powered Gamification Plugin for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: meritocracy
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 24, 2022
  • Latest release: Oct 23, 2023
  • Number of updates: 16
  • Update frequency: every 20.9 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Meritocracy - Near-Powered Gamification Plugin for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.48 ▼6.92
Dashboard /wp-admin3.32 ▼0.0343.20 ▼17.22
Posts /wp-admin/edit.php3.43 ▲0.0841.93 ▼6.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.92 ▼23.76
Media Library /wp-admin/upload.php3.24 ▲0.0133.23 ▼2.36

Server storage [IO: ▲0.61MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Meritocracy - Near-Powered Gamification Plugin for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▲0.001.63 ▲0.1439.84 ▲1.07
Dashboard /wp-admin2,195 ▲215.51 ▼0.0684.29 ▼1.4538.70 ▼2.41
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0934.80 ▲0.6333.61 ▼0.46
Add New Post /wp-admin/post-new.php1,526 ▼222.97 ▼0.07664.19 ▲28.4152.95 ▼1.35
Media Library /wp-admin/upload.php1,391 ▼94.13 ▼0.0599.63 ▲2.7641.90 ▼0.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 plugin_dir_path() in wp-content/plugins/meritocracy/meritocracy.php:117

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #7 (**Buying points with Near coins")
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

meritocracy/meritocracy.php Passed 13 tests

"Meritocracy - Near-Powered Gamification Plugin for WordPress" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
93 characters long description:
Expands the buyCred and cashCred add-on in myCred to allow points exchanges via MyNearWallet.

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
There were no executable files found in this plugin14,315 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,9381,88213,718
PHP3301238597

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.00
▷ Minimum class complexity11.00
▷ Maximum class complexity36.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods44
▷ Static methods49.09%
▷ Public methods4193.18%
▷ Protected methods12.27%
▷ Private methods24.55%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/meritocracy-logo.png3.10KB1.97KB▼ 36.51%
assets/images/near.png2.12KB2.21KB0.00%