84% mycred-anspress-integration

Code Review | myCred – AnsPress (Gamify your Question and answer Sites)

WordPress plugin myCred – AnsPress (Gamify your Question and answer Sites) scored84%from 54 tests.

About plugin

  • Plugin page: mycred-anspress-i...
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 29, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 17
  • Update frequency: every 56.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,064 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.64ms] Passed 4 tests

An overview of server-side resources used by myCred – AnsPress (Gamify your Question and answer Sites)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.76 ▼1.96
Dashboard /wp-admin3.35 ▼0.0047.00 ▼20.95
Posts /wp-admin/edit.php3.40 ▲0.0449.18 ▲2.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.42 ▼26.07
Media Library /wp-admin/upload.php3.27 ▲0.0435.30 ▲2.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for myCred – AnsPress (Gamify your Question and answer Sites)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3814.32 ▲0.321.68 ▼0.0839.17 ▼4.49
Dashboard /wp-admin2,205 ▲285.59 ▼0.0593.03 ▼11.5640.44 ▼1.45
Posts /wp-admin/edit.php2,113 ▲132.03 ▲0.0740.97 ▲1.5338.75 ▲3.33
Add New Post /wp-admin/post-new.php1,536 ▲923.24 ▲0.39678.85 ▲38.1754.19 ▲4.11
Media Library /wp-admin/upload.php1,410 ▲134.20 ▲0.0299.77 ▼4.7541.58 ▼4.01

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-anspress-integration/mycred-anspress-integration.php:136

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: quiz, achievement, ranks, anspress, mycred

mycred-anspress-integration/mycred-anspress-integration.php 85% from 13 tests

The entry point to "myCred – AnsPress (Gamify your Question and answer Sites)" version 1.1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "WP 4.8")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,031 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP122635461,017
CSS13012
JavaScript1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.40
▷ Minimum class complexity8.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods57
▷ Static methods11.75%
▷ Public methods5494.74%
▷ Protected methods00.00%
▷ Private methods35.26%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
There were not PNG files found in your plugin