84% csfd-last-seen

Code Review | ČSFD Last Seen

WordPress plugin ČSFD Last Seen scored84%from 54 tests.

About plugin

  • Plugin page: csfd-last-seen
  • Plugin version: 1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.7.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2009
  • Latest release: May 13, 2021
  • Number of updates: 65
  • Update frequency: every 64.4 days
  • Top authors: JosefStepanek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,366 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.07MB] [CPU: ▼3.74ms] Passed 4 tests

This is a short check of server-side resources used by ČSFD Last Seen
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.89 ▲5.92
Dashboard /wp-admin3.37 ▲0.0743.80 ▼4.45
Posts /wp-admin/edit.php3.42 ▲0.0747.96 ▲1.92
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.05 ▼13.13
Media Library /wp-admin/upload.php3.29 ▲0.0635.51 ▲0.71

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_csfdlastseen
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

ČSFD Last Seen: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.161.65 ▼0.1736.65 ▼6.35
Dashboard /wp-admin2,206 ▲215.90 ▲0.9997.22 ▼17.2540.64 ▼4.64
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0638.48 ▼1.5236.87 ▼0.30
Add New Post /wp-admin/post-new.php1,533 ▼323.32 ▲0.15698.55 ▲69.3650.37 ▼0.98
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0891.55 ▼11.1340.12 ▼5.82

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
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_csfdlastseen

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/csfd-last-seen/csfd-last-seen.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (An example of use in a sidebar), #2 (Admin widget configuration)
The official readme.txt is a good inspiration

csfd-last-seen/csfd-last-seen.php Passed 13 tests

The main PHP script in "ČSFD Last Seen" version 1.9.2 is automatically included on every request by WordPress
92 characters long description:
Adds a widget, which shows the last X movies rated on CSFD.cz (Czech-Slovak movie database).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected129 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15326129

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png26.45KB10.42KB▼ 60.59%
screenshot-1.png66.85KB21.83KB▼ 67.35%