10% latest-articles

Code Review | User Photo

WordPress plugin User Photo scored10%from 54 tests.

About plugin

  • Plugin page: latest-articles
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5+
  • WordPress version: 6.3.1
  • First release: Dec 8, 2012
  • Latest release: Dec 8, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: planetoftheweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,180 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/latest-articles/widget-latestarticles.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; LatestArticles has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.06ms] Passed 4 tests

A check of server-side resources used by User Photo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.16 ▼39.10
Dashboard /wp-admin2.09 ▼1.215.45 ▼48.70
Posts /wp-admin/edit.php2.09 ▼1.275.97 ▼45.97
Add New Post /wp-admin/post-new.php2.09 ▼3.805.06 ▼90.46
Media Library /wp-admin/upload.php2.09 ▼1.147.07 ▼30.69

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_latest_articles

Browser metrics Passed 4 tests

User Photo: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.74 ▼0.0842.82 ▼4.06
Dashboard /wp-admin2,195 ▲215.70 ▲0.1084.88 ▼15.1741.99 ▼4.43
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0335.94 ▼0.4437.87 ▲0.42
Add New Post /wp-admin/post-new.php1,540 ▲1418.57 ▼4.35657.35 ▼3.6654.10 ▼3.90
Media Library /wp-admin/upload.php1,397 ▼64.16 ▼0.0596.10 ▼12.0143.49 ▼5.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/latest-articles/widget-latestarticles.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; LatestArticles has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_latest_articles

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/latest-articles/widget-latestarticles.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: posts, list

latest-articles/widget-latestarticles.php 92% from 13 tests

The main file in "User Photo" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("latest-articles.php" instead of "widget-latestarticles.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected154 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1261283
CSS117071

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png41.67KB12.71KB▼ 69.50%