83% mycred-gamipress-importer

Code Review | myCred - GamiPress Importer

WordPress plugin myCred - GamiPress Importer scored83%from 54 tests.

About plugin

  • Plugin page: mycred-gamipress-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 20
  • Update frequency: every 49.9 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,050 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.61ms] Passed 4 tests

A check of server-side resources used by myCred - GamiPress Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.03 ▼8.95
Dashboard /wp-admin3.37 ▲0.0747.79 ▼3.76
Posts /wp-admin/edit.php3.42 ▲0.0647.02 ▼2.57
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.62 ▼11.15
Media Library /wp-admin/upload.php3.30 ▲0.0636.08 ▼1.43

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

myCred - GamiPress Importer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1714.26 ▼0.061.65 ▼0.3939.89 ▼4.51
Dashboard /wp-admin2,209 ▲325.62 ▲0.0888.63 ▼7.8742.45 ▼0.99
Posts /wp-admin/edit.php2,114 ▲141.99 ▲0.0441.44 ▲1.3537.63 ▲8.01
Add New Post /wp-admin/post-new.php1,610 ▲8422.89 ▼0.57680.36 ▲27.1736.53 ▼21.75
Media Library /wp-admin/upload.php1,414 ▲144.18 ▲0.04100.75 ▼5.3645.45 ▲0.69

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-gamipress-importer/mycred-gamipress-importer.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

mycred-gamipress-importer/mycred-gamipress-importer.php 85% from 13 tests

The entry point to "myCred - GamiPress Importer" version 1.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WP 4.8")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin444 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14682402
CSS16024
JavaScript10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions0
▷ Named functions00.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