10% sm-cpt-sidebar-widget-displays

Code Review | SM CPT Sidebar Widget Displays

WordPress plugin SM CPT Sidebar Widget Displays scored10%from 54 tests.

About plugin

  • Plugin page: sm-cpt-sidebar-wi...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.2
  • WordPress version: 6.3.1
  • First release: May 14, 2013
  • Latest release: Jul 27, 2015
  • Number of updates: 13
  • Update frequency: every 62.2 days
  • Top authors: sethmatics (84.62%)sethcarstens (23.08%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,608 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/sm-cpt-sidebar-widget-displays/sm-cpt-sidebar-widget-displays.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; Display_CTPs_Widget has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼53.74ms] Passed 4 tests

Analyzing server-side resources used by SM CPT Sidebar Widget Displays
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.378.14 ▼35.92
Dashboard /wp-admin2.11 ▼1.196.19 ▼46.82
Posts /wp-admin/edit.php2.11 ▼1.245.33 ▼43.35
Add New Post /wp-admin/post-new.php2.11 ▼3.778.64 ▼88.85
Media Library /wp-admin/upload.php2.11 ▼1.114.98 ▼32.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SM CPT Sidebar Widget Displays
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.73 ▲0.541.94 ▲0.1043.42 ▼4.07
Dashboard /wp-admin2,186 ▲65.50 ▼0.1796.24 ▲5.1343.83 ▼1.38
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0240.39 ▲3.4235.20 ▼2.14
Add New Post /wp-admin/post-new.php1,537 ▲918.33 ▼4.85607.66 ▼83.8566.17 ▲11.05
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0198.99 ▼12.5444.21 ▼2.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/sm-cpt-sidebar-widget-displays/sm-cpt-sidebar-widget-displays.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; Display_CTPs_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_display_cpts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sm-cpt-sidebar-widget-displays/sm-cpt-sidebar-widget-displays.php:223

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Example of the widget in a sidebar.), #2 (Example of a the widget on a website, after styling with custom CSS.)
You can look at the official readme.txt

sm-cpt-sidebar-widget-displays/sm-cpt-sidebar-widget-displays.php Passed 13 tests

"SM CPT Sidebar Widget Displays" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
32 characters long description:
Lists all pages in site in admin

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 detected148 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11959148

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png14.71KB15.60KB0.00%
screenshot-1.png9.43KB9.78KB0.00%