72% sk-post-type-access

Code Review | SK Post Type Access

WordPress plugin SK Post Type Access scored72%from 54 tests.

About plugin

  • Plugin page: sk-post-type-access
  • Plugin version: 0.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.9.1
  • WordPress version: 6.3.1
  • First release: May 28, 2014
  • Latest release: Aug 17, 2014
  • Number of updates: 20
  • Update frequency: every 4.1 days
  • Top authors: Fastmover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.49ms] Passed 4 tests

Server-side resources used by SK Post Type Access
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.93 ▼10.22
Dashboard /wp-admin3.37 ▲0.0648.94 ▼3.36
Posts /wp-admin/edit.php3.48 ▲0.1250.10 ▼1.27
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.95 ▼15.12
Media Library /wp-admin/upload.php3.29 ▲0.0639.56 ▲4.75
Post Type Access /wp-admin/users.php?page=sk_post_type_access_options_page3.2635.97

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SK Post Type Access
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼0.701.80 ▼1.0351.15 ▲3.68
Dashboard /wp-admin2,210 ▲244.87 ▼1.06108.00 ▼26.4341.91 ▼12.33
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0439.87 ▼1.7735.64 ▼7.52
Add New Post /wp-admin/post-new.php1,536 ▲323.09 ▼0.34685.67 ▲27.5388.23 ▲0.08
Media Library /wp-admin/upload.php1,386 ▼24.29 ▲0.07105.45 ▼11.6344.29 ▼3.48
Post Type Access /wp-admin/users.php?page=sk_post_type_access_options_page2,2812.2243.0936.38

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=sk_post_type_access_options_page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=sk_post_type_access_options_page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 45 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=sk_post_type_access_options_page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'ID' of non-object
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=sk_post_type_access_options_page
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sk-post-type-access/sk_post_type_access.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/users.php?page=sk_post_type_access_options_page
    • > Network (severe)
    wp-content/plugins/sk-post-type-access/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/users.php?page=sk_post_type_access_options_page
    • > Network (severe)
    wp-content/plugins/sk-post-type-access/images/ui-icons_888888_256x240.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === sk-post-type-access === )
Please take inspiration from this readme.txt

sk-post-type-access/sk_post_type_access.php 92% from 13 tests

The primary PHP file in "SK Post Type Access" version 0.0.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sk-post-type-access.php" instead of "sk_post_type_access.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,460 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS134491,095
PHP120324344
JavaScript14711
Markdown14010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.50
▷ Minimum class complexity5.00
▷ Maximum class complexity38.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1672.73%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.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
No PNG files were detected