74% pmc-lockdown

Code Review | PMC Lockdown

WordPress plugin PMC Lockdown scored 74% from 54 tests.

About plugin

  • Plugin page: pmc-lockdown
  • Plugin version: 0.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.3.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2011
  • Latest release: Mar 14, 2012
  • Number of updates: 10
  • Update frequency: every 133.0 days
  • Top authors: pmcdotcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,556 total downloads

Benchmarks

Plugin footprint 65% 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.90MB] [CPU: ▼34.01ms] Passed 4 tests

This is a short check of server-side resources used by PMC Lockdown
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0338.88 ▼4.02
Dashboard /wp-admin3.04 ▼0.2625.20 ▼21.92
Posts /wp-admin/edit.php3.04 ▼0.3119.87 ▼26.63
Add New Post /wp-admin/post-new.php3.04 ▼2.8421.55 ▼77.39
Media Library /wp-admin/upload.php3.04 ▼0.1824.43 ▼10.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PMC Lockdown
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.171.81 ▼0.0543.78 ▼2.87
Dashboard /wp-admin2,209 ▲184.84 ▼0.13106.38 ▼0.7139.67 ▼6.42
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0236.43 ▲0.3231.40 ▼1.79
Add New Post /wp-admin/post-new.php1,533 ▼923.17 ▲4.95702.97 ▲94.6157.84 ▲5.05
Media Library /wp-admin/upload.php1,391 ▲94.30 ▲0.0695.82 ▼4.0342.77 ▼1.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function add_settings_field was called with an argument that is deprecated since version 3.5.0! The "privacy" options group has been removed. Use another settings group.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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 everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmc-lockdown/pmc_lockdown.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: maintenance

pmc-lockdown/pmc_lockdown.php 92% from 13 tests

This is the main PHP file of "PMC Lockdown" version 0.9.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pmc-lockdown.php" instead of "pmc_lockdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected86 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1299186

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin