84% elegant-posts-widget

Code Review | Elegant Posts Widget

WordPress plugin Elegant Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: elegant-posts-widget
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2017
  • Latest release: Sep 9, 2017
  • Number of updates: 5
  • Update frequency: every 1.8 days
  • Top authors: templatebyte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼11.14ms] Passed 4 tests

An overview of server-side resources used by Elegant Posts Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.60 ▼2.34
Dashboard /wp-admin3.43 ▲0.0948.10 ▼17.78
Posts /wp-admin/edit.php3.54 ▲0.1949.07 ▲1.00
Add New Post /wp-admin/post-new.php6.01 ▲0.1291.27 ▼23.73
Media Library /wp-admin/upload.php3.35 ▲0.1235.20 ▼0.69
Elegant Posts Widget /wp-admin/options-general.php?page=templatebyte-epw3.3233.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_templatebyte-epw-post

Browser metrics Passed 4 tests

A check of browser resources used by Elegant Posts Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.13 ▼1.141.72 ▼0.0941.64 ▼2.45
Dashboard /wp-admin2,207 ▲185.79 ▲0.77104.67 ▼18.8439.53 ▼5.85
Posts /wp-admin/edit.php2,096 ▲102.02 ▼0.0039.24 ▲3.9533.94 ▼0.82
Add New Post /wp-admin/post-new.php1,538 ▲1023.21 ▲5.13667.12 ▲35.2264.38 ▼3.90
Media Library /wp-admin/upload.php1,392 ▲44.28 ▲0.09104.70 ▲8.6243.36 ▲1.11
Elegant Posts Widget /wp-admin/options-general.php?page=templatebyte-epw9332.0422.8629.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_templatebyte-epw-post

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require(): Failed opening required 'TEMPLATEBYTE_EPW_DIRinc/class-templatebyte-epw-method.php' (include_path='.:/usr/share/php') in wp-content/plugins/elegant-posts-widget/inc/class-templatebyte-epw.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/elegant-posts-widget/inc/settings-page.php:2
    • > PHP Warning
      require(TEMPLATEBYTE_EPW_DIRinc/class-templatebyte-epw-method.php): failed to open stream: No such file or directory in wp-content/plugins/elegant-posts-widget/inc/class-templatebyte-epw.php on line 44
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elegant-posts-widget/inc/class-templatebyte-epw-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/elegant-posts-widget/elegant-posts-widget.php:33
    • > PHP Warning
      Use of undefined constant TEMPLATEBYTE_EPW_DIR - assumed 'TEMPLATEBYTE_EPW_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/elegant-posts-widget/inc/class-templatebyte-epw.php on line 44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: sidebar, post, widget, elegant

elegant-posts-widget/elegant-posts-widget.php Passed 13 tests

This is the main PHP file of "Elegant Posts Widget" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
58 characters long description:
Adds a widget to display the posts on your blog elegantly.

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 plugin757 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6202304512
CSS23515227
JavaScript1131718

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.50
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin