10% wordpoints

Code Review | WordPoints

WordPress plugin WordPoints scored10%from 54 tests.

About plugin

  • Plugin page: wordpoints
  • Plugin version: 2.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7+
  • WordPress version: 6.3.1
  • First release: Sep 14, 2013
  • Latest release: May 8, 2018
  • Number of updates: 112
  • Update frequency: every 15.2 days
  • Top authors: jdgrimes (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

200+ active /27,733 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wordpoints/components/points/includes/class-wordpoints-points-hook.php+764
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▲0.46MB] [CPU: ▼6.52ms] Passed 4 tests

This is a short check of server-side resources used by WordPoints
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5153.32 ▲11.60
Dashboard /wp-admin3.76 ▲0.4154.32 ▼14.48
Posts /wp-admin/edit.php3.94 ▲0.5959.13 ▲7.42
Add New Post /wp-admin/post-new.php6.41 ▲0.52100.52 ▼25.02
Media Library /wp-admin/upload.php3.61 ▲0.3942.85 ▲6.00
Install Extensions /wp-admin/admin.php?page=wordpoints_install_modules3.6140.54
Extensions /wp-admin/admin.php?page=wordpoints_extensions3.9542.00
Points Types /wp-admin/admin.php?page=wordpoints_points_types3.9748.79
Install Extensions /wp-admin/admin.php?page=wordpoints_install_extensions3.5841.95
Settings /wp-admin/admin.php?page=wordpoints_configure3.6240.99
Points Logs /wp-admin/admin.php?page=wordpoints_points_logs3.6143.36

Server storage [IO: ▲2.30MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 430 new files
Database: 5 new tables, 13 new options
New tables
wp_wordpoints_hook_hits
wp_wordpoints_hook_periods
wp_wordpoints_hook_hitmeta
wp_wordpoints_points_logs
wp_wordpoints_points_log_meta
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_wordpoints_points_widget
wordpoints_installable_versions
wordpoints_legacy_points_hooks_disabled
wordpoints_data
widget_wordpoints_points_logs_widget
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for WordPoints
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8714.37 ▼0.381.84 ▲0.0342.86 ▲1.30
Dashboard /wp-admin2,239 ▲595.65 ▼0.0395.10 ▲5.7541.82 ▼3.95
Posts /wp-admin/edit.php2,148 ▲482.01 ▼0.0441.48 ▲1.6537.03 ▲2.65
Add New Post /wp-admin/post-new.php1,586 ▲6023.43 ▲5.82649.98 ▼73.7160.59 ▼8.38
Media Library /wp-admin/upload.php1,444 ▲444.22 ▼0.01100.00 ▼11.9143.56 ▼3.52
Install Extensions /wp-admin/admin.php?page=wordpoints_install_modules8801.7027.35115.73
Extensions /wp-admin/admin.php?page=wordpoints_extensions1,0601.7226.7332.33
Points Types /wp-admin/admin.php?page=wordpoints_points_types1,0502.7361.1047.85
Install Extensions /wp-admin/admin.php?page=wordpoints_install_extensions8761.7625.2541.26
Settings /wp-admin/admin.php?page=wordpoints_configure9872.1623.4529.24
Points Logs /wp-admin/admin.php?page=wordpoints_points_logs8162.0325.0425.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 300× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Hook_Event' not found in wp-content/plugins/wordpoints/classes/hook/event/dynamic.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Hook_Action_Post_Type' not found in wp-content/plugins/wordpoints/classes/hook/action/post/type/comment.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Entity_Relationship_Dynamic_Stored_Field' not found in wp-content/plugins/wordpoints/classes/entity/comment/parent.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wordpoints/components/points/admin/screens/hooks-no-js-load.php:10
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/wordpoints/components/points/includes/constants.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Updater_DB_Tables_UTF8MB4' not found in wp-content/plugins/wordpoints/components/points/classes/updater/2/0/0/tables.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Installable_Basic' not found in wp-content/plugins/wordpoints/classes/installable/legacy.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Entity_Stored_DB_Table' not found in wp-content/plugins/wordpoints/classes/entity/comment.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Entity_Relationship_Dynamic_Stored_Field' not found in wp-content/plugins/wordpoints/classes/entity/post/parent.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WordPoints_Hook_Extension' not found in wp-content/plugins/wordpoints/classes/hook/extension/repeat/blocker.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tested up to: Version not formatted correctly
You can look at the official readme.txt

wordpoints/wordpoints.php Passed 13 tests

The principal PHP file in "WordPoints" v. 2.4.2 is loaded by WordPress automatically on each request
74 characters long description:
Create one or more points systems for your site, and reward user activity.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin35,742 lines of code in 419 files:
LanguageFilesBlank linesComment linesLines of code
PHP37010,34224,47424,210
PO File32,0462,9555,775
JavaScript201,4919373,398
CSS265645882,359

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.12
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces49
Traits0
Classes254
▷ Abstract classes3814.96%
▷ Concrete classes21685.04%
▷ Final classes146.48%
Methods1,486
▷ Static methods785.25%
▷ Public methods1,02168.71%
▷ Protected methods42628.67%
▷ Private methods392.62%
Functions292
▷ Named functions292100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/points/admin/assets/images/arrows-dark.png0.24KB0.24KB0.41%
components/points/admin/assets/images/arrows.png0.24KB0.24KB0.00%