84% custom-single

Code Review | Custom-Single

WordPress plugin Custom-Single scored84%from 54 tests.

About plugin

  • Plugin page: custom-single
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Dec 11, 2013
  • Number of updates: 4
  • Update frequency: every 37.0 days
  • Top authors: kasigi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,273 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Custom-Single
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.40 ▼4.40
Dashboard /wp-admin3.31 ▲0.0145.90 ▼5.25
Posts /wp-admin/edit.php3.36 ▲0.0050.42 ▲0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.05 ▼20.81
Media Library /wp-admin/upload.php3.23 ▲0.0033.94 ▼0.63

Server storage [IO: ▲0.00MB] [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
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Custom-Single
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.70 ▼1.101.84 ▼0.0143.26 ▼1.62
Dashboard /wp-admin2,206 ▲155.91 ▲0.82108.13 ▼7.9640.68 ▼4.38
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0039.85 ▼1.0834.99 ▼1.97
Add New Post /wp-admin/post-new.php1,542 ▲918.21 ▼4.86644.58 ▼35.6952.34 ▼16.89
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.0995.90 ▼19.7742.26 ▼5.76

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-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-single/custom-single.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: template, posts, categories, custom, singlephp...

custom-single/custom-single.php Passed 13 tests

The principal PHP file in "Custom-Single" v. 1.0.0 is loaded by WordPress automatically on each request
101 characters long description:
Enables themes to support custom single.php templates per category in the form single-CATEGORYID.php.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected61 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1201261

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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 images were found in this plugin