79% sf-pages-for-custom-posts

Code Review | SF Pages For Custom Posts

WordPress plugin SF Pages For Custom Posts scored79%from 54 tests.

About plugin

  • Plugin page: sf-pages-for-cust...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.2.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2011
  • Latest release: Sep 30, 2013
  • Number of updates: 17
  • Update frequency: every 44.0 days
  • Top authors: GregLone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,381 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.97ms] Passed 4 tests

This is a short check of server-side resources used by SF Pages For Custom Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.23 ▼5.38
Dashboard /wp-admin3.31 ▼0.0343.15 ▼18.38
Posts /wp-admin/edit.php3.36 ▲0.0144.58 ▼0.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.85 ▼7.99
Media Library /wp-admin/upload.php3.24 ▲0.0135.82 ▲2.19
Pages for C. Posts /wp-admin/options-general.php?page=sf_pfcp_config3.1629.00

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

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

Browser metrics Passed 4 tests

SF Pages For Custom Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.33 ▼1.101.88 ▼0.0345.64 ▲2.35
Dashboard /wp-admin2,210 ▲194.88 ▼0.24107.36 ▲2.6742.35 ▲4.50
Posts /wp-admin/edit.php2,096 ▲71.99 ▲0.0141.58 ▲5.6935.73 ▼3.74
Add New Post /wp-admin/post-new.php1,541 ▲1323.03 ▲2.04661.34 ▲8.9363.57 ▲18.45
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.01103.45 ▼2.2044.15 ▼1.73
Pages for C. Posts /wp-admin/options-general.php?page=sf_pfcp_config8122.0326.9225.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=sf_pfcp_config
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/options-general.php?page=sf_pfcp_config
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=sf_pfcp_config
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sf-pages-for-custom-posts/sf-pages-for-custom-posts.php:140

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
3 plugin tags: page, post types, content

sf-pages-for-custom-posts/sf-pages-for-custom-posts.php Passed 13 tests

The principal PHP file in "SF Pages For Custom Posts" v. 0.5 is loaded by WordPress automatically on each request
118 characters long description:
Allows you to easily assign to a page your custom post types with a settings panel, like you can do with normal posts.

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
No dangerous file extensions were detected289 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24638231
PO File1222558

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin