10% projects-m-membership

Code Review | Projects M Membership

WordPress plugin Projects M Membership scored10%from 54 tests.

About plugin

  • Plugin page: projects-m-member...
  • Plugin version: 1.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 9, 2018
  • Latest release: Jun 28, 2022
  • Number of updates: 60
  • Update frequency: every 23.8 days
  • Top authors: projectsm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,196 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > User deprecated in wp-content/plugins/projects-m-membership/vendor/twig/twig/lib/Twig/Loader/Filesystem.php+7
    Using the "Twig_Loader_Filesystem" class is deprecated since Twig version 2.7, use "Twig\Loader\FilesystemLoader" instead.

Server metrics [RAM: ▼1.77MB] [CPU: ▼53.42ms] Passed 4 tests

Analyzing server-side resources used by Projects M Membership
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.2413.32 ▼41.80
Dashboard /wp-admin2.24 ▼1.069.86 ▼35.93
Posts /wp-admin/edit.php2.25 ▼1.118.07 ▼41.46
Add New Post /wp-admin/post-new.php2.24 ▼3.6510.34 ▼94.50
Media Library /wp-admin/upload.php2.25 ▼0.998.98 ▼23.62
Übersicht /wp-admin/admin.php?page=pm_membership2.248.76
Anmeldungen /wp-admin/admin.php?page=pm_membership_sign-ups2.248.89

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Projects M Membership
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.61 ▼0.775.79 ▲3.9541.75 ▼1.33
Dashboard /wp-admin2,220 ▲294.89 ▼0.02102.18 ▼8.7766.92 ▲28.27
Posts /wp-admin/edit.php2,118 ▲261.98 ▼0.0235.49 ▼6.4434.55 ▼3.95
Add New Post /wp-admin/post-new.php1,690 ▲15722.40 ▼0.82749.50 ▲30.6654.62 ▼1.72
Media Library /wp-admin/upload.php1,411 ▲264.14 ▼0.0497.32 ▼5.0475.21 ▲34.21
Übersicht /wp-admin/admin.php?page=pm_membership9052.2127.5930.62
Anmeldungen /wp-admin/admin.php?page=pm_membership_sign-ups9252.0525.6626.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-content/plugins/projects-m-membership/vendor/twig/twig/lib/Twig/Loader/Filesystem.php+7
    Using the "Twig_Loader_Filesystem" class is deprecated since Twig version 2.7, use "Twig\Loader\FilesystemLoader" instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pm_membership_sign-ups
    • > User deprecated in wp-content/plugins/projects-m-membership/vendor/twig/twig/lib/Twig/Loader/Filesystem.php+7
    Using the "Twig_Loader_Filesystem" class is deprecated since Twig version 2.7, use "Twig\Loader\FilesystemLoader" instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pm_membership_sign-ups
    • > User deprecated in wp-content/plugins/projects-m-membership/vendor/twig/twig/lib/Twig/Environment.php+7
    Using the "Twig_Environment" class is deprecated since Twig version 2.7, use "Twig\Environment" instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pm_membership_sign-ups
    • > Notice in wp-content/plugins/projects-m-membership/src/Api/MembershipCloud.php+122
    Trying to access array offset on value of type null

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/projects-m-membership/projects-m-membership.php
  • 169× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/TokenParser/ImportTokenParser.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ProjectsM\\MembershipWordpress\\Api\\Data\\AbstractEntity' not found in wp-content/plugins/projects-m-membership/src/Api/Data/OptionsCategory.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ProjectsM\\MembershipWordpress\\Api\\Data\\AbstractEntity' not found in wp-content/plugins/projects-m-membership/src/Api/Data/Notification/WelcomeNotification.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/Error/SyntaxError.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'ProjectsM\\MembershipWordpress\\Api\\Constraint\\ValidationConstraintInterface' not found in wp-content/plugins/projects-m-membership/src/Api/Constraint/IbanConstraint.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/Node/SetNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/projects-m-membership/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
No plugin tags provided

projects-m-membership/projects-m-membership.php Passed 13 tests

"Projects M Membership" version 1.4.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
Integrates the Projects M Membership system into your WordPress installation.

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
Everything looks great! No dangerous files found in this plugin20,314 lines of code in 439 files:
LanguageFilesBlank linesComment linesLines of code
PHP4184,4766,08919,105
JSON700650
Twig5262294
YAML2480155
Markdown447098
reStructuredText18510
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity5.31
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces35
Interfaces16
Traits1
Classes384
▷ Abstract classes123.12%
▷ Concrete classes37296.88%
▷ Final classes5213.98%
Methods1,006
▷ Static methods969.54%
▷ Public methods83783.20%
▷ Protected methods616.06%
▷ Private methods10810.74%
Functions183
▷ Named functions16087.43%
▷ Anonymous functions2312.57%
Constants72
▷ Global constants1115.28%
▷ Class constants6184.72%
▷ Public constants6098.36%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
build/img/icon.png0.46KB0.46KB0.00%