84% tomek-members-only-reloaded

Code Review | Tomek Members Only Reloaded

WordPress plugin Tomek Members Only Reloaded scored 84% from 54 tests.

About plugin

  • Plugin page: tomek-members-onl...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 7, 2018
  • Latest release: Dec 7, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: tomek00 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 442 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Tomek Members Only Reloaded
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.74 ▼4.51
Dashboard /wp-admin3.33 ▲0.0347.34 ▼4.45
Posts /wp-admin/edit.php3.38 ▲0.0345.48 ▼1.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.19 ▼6.27
Media Library /wp-admin/upload.php3.25 ▲0.0335.14 ▲0.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Tomek Members Only Reloaded
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.151.74 ▼0.0344.61 ▲0.25
Dashboard /wp-admin2,203 ▲145.83 ▲0.9094.73 ▼22.7035.95 ▼11.96
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0435.02 ▼1.3330.38 ▼1.51
Add New Post /wp-admin/post-new.php6,474 ▲4,95420.15 ▼2.89927.42 ▲232.6961.42 ▲13.20
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.0391.53 ▼7.5443.78 ▼2.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • 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
Good news, no errors were detected

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tomek-members-only-reloaded/tomek-members-only-reloaded.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: register, more, user, logon, admin...

tomek-members-only-reloaded/tomek-members-only-reloaded.php Passed 13 tests

The main PHP file in "Tomek Members Only Reloaded" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
119 characters long description:
This plugin lets only the posts without more tag read for the visitors . Otherwise it is only to the more tag readable.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin149 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP168111
PO File1111138

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png68.16KB25.89KB▼ 62.02%
screenshot-1.png61.45KB23.26KB▼ 62.15%