84% gamipress-mycred-importer

Code Review | GamiPress - myCRED Importer

WordPress plugin GamiPress - myCRED Importer scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-mycred-...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2018
  • Latest release: Sep 4, 2023
  • Number of updates: 27
  • Update frequency: every 75.3 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

Server-side resources used by GamiPress - myCRED Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0246.97 ▲8.29
Dashboard /wp-admin3.33 ▼0.0244.40 ▼16.33
Posts /wp-admin/edit.php3.38 ▲0.0245.06 ▼4.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.56 ▼21.19
Media Library /wp-admin/upload.php3.25 ▲0.0235.43 ▼0.35

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for GamiPress - myCRED Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.41 ▼0.011.65 ▼0.0039.86 ▼0.03
Dashboard /wp-admin2,218 ▲385.64 ▲0.0082.71 ▼4.3239.34 ▼1.95
Posts /wp-admin/edit.php2,121 ▲242.00 ▲0.0234.67 ▼5.2035.06 ▼0.06
Add New Post /wp-admin/post-new.php1,543 ▲1723.11 ▲0.07670.31 ▼58.1850.18 ▼3.43
Media Library /wp-admin/upload.php1,417 ▲204.33 ▲0.1197.74 ▼14.5344.54 ▼2.15

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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: 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-mycred-importer/gamipress-mycred-importer.php:204

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

gamipress-mycred-importer/gamipress-mycred-importer.php Passed 13 tests

"GamiPress - myCRED Importer" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
57 characters long description:
Tool to migrate all stored data from myCRED to GamiPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,069 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3338300955
JavaScript24227114

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected